Omg Lol I was looking for something like this for my game but i forgot now what kind of game I was making. Liking this video so if I remember Ill continue it! Thank youuuuuuuuuuuuu
This is exactly what I needed for my speed running game too. Please do not stop doing these videos. Your topics are relatable and practical, and your style of teaching is easy to follow. You are always my go to channel when I am researching a topic for Roblox studio. Thank you.
Thanks! If you wan't to teleport the player if the time runs out, here is the part you change - player.Character.Humanoid.Health = 0 LowerTorso = player.Character.LowerTorso LowerTorso.CFrame = game.Workspace.NameOfPartToTeleportTo.CFrame
I've seen a few people wanting to reverse this. Here's how you would do it: 1. Set time_val to 0 2. Set > 0 to < 10 3. Set "time_num = time_num - 1" to "time_num = time_num -+ 1"
This code seems to have an error where it cannot restart the timer if the player walks back and touches the green part. This can be fixed by adding: timer_started = false to the stop_timer function. EX: if player.Name == LPlayer.Name then player.PlayerGui.Timer.Label.Visible = false completed = true timer_started = false end
Thanx a lot this is what I really needed for my game :D People like you should get more recognition as you are helping the Roblox Community make games!
thank you! heres the script: (i did 60 seconds, you can change it) local start = game.Workspace.Start local stop = game.Workspace.Stop local time_val = 60 local timer_started = false local completed = false local time_label = script.Parent time_label.Visible = false local LPlayer = game.Players.LocalPlayer local function start_Timer(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player.Name == LPlayer.Name and not timer_started then timer_started = true time_label.Text = time_val player.PlayerGui.Timer.Label.Visible = true local time_num = tonumber(player.PlayerGui.Timer.Label.Text) while time_num > 0 do wait(1) time_num = time_num - 1 player.PlayerGui.Timer.Label.Text = tostring(time_num) end if not completed then player.PlayerGui.Timer.Label.Visible = false player.Character.Humanoid.Health = 0 end timer_started = false completed = false player.PlayerGui.Timer.Label.Text = time_val end end local function finish_timer(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player.Name == LPlayer.Name then player.PlayerGui.Timer.Label.Visible = false completed = true end end start.Touched:Connect(start_Timer) stop.Touched:Connect(finish_timer)
How to make a Main Menu on the beginning of the game and where u click "Play", "....", "...." and when u move your mouse on bottoms it makes noise and u can customize it. And when you click play there's a typing sentences and it makes keyboard typing noises. Keep up the good work! :)
What if I wanted it to add time instead of having it be like a normal timer and when it reaches something like 6AM it awards you a badge then kicks you?
When I do this but go back to the green part it does a glitchy 10 then it goes back to the number that it was previously at because it is still ticking the numbers even though the countdown isn’t visible anymore Is there a way to fix this?? Please help
I'm sorry, Mike, it doesn't work, when I touch the Start part the time doesn't shows up. The output says: Touched is not a valid member of Model "Workspace.Start"
This script is great. But I want it to teleport the character after "if not completed", and I can't figure out any way to make it work. I don't want the death. And I'm working on a game jam. So it's really frustrating. *cries in script*
thanks imma do this but instead of getting to a other pad imma make it a button because im making a tower defense game also imma not use the kill script but instead use a teleprting to game script
AMAZING but for some reason it says my teleport had a error i did make it public its the exact same as YOUR script soo maybe you could tell me what happend or how to debug it?
How do you make a counter that tracts time when you step on a block then stops when you go on another block. kinda like that same thing just going up instead of couting down?
Hey mike. I hope you see this.. i have a problem and i figure that since we have the same name maybe you could help me out? i have been trying to get my RoundTimer function to show on a Part surface gui insted of a gui on the screen. but i cant seem to wrap my head around it.. is there any way you could help me out?
local replicatedStorage = game:GetService("ReplicatedStorage") local values = replicatedStorage:WaitForChild("Values") local status = values:WaitForChild("status") local text = script.Parent status.Changed:Connect(function() text.Text = status.Value end) this is a Localscript in the TextLabel in a surfaceGui attached to a part, but it wont change the text
oi again.. i solved the problem by inserting a script insted of Localscript into the surfaceGui as parent and changed the local text = script.parent to this..- local text = script.Parent.Time. so thanks anyway! :D
Do you know how to have the timer increase instead of decreasing? Like when you step on platform and then a timer appears except the time goes up every second
Is there a way to make a timer so that when you start the game it automatically runs and when the time runs out the timer restarts? If there is can you reply to this message with the script or make a video about it? Thx!
It's a simple while true do loop. All you need is a "while true do" for a loop. Then you get that to repeat, and it's done. Also no you do not need a "PlayerAdded"
Could you teach us how to script a tool giver but before the person gives the tool to the player they can pick a price and then sell the tool to the player for in game currency (Set by the player giving to the person) like in the game wild west where bartenders can give food to players for money
@@TechwithMikeYT I had a solution. I couldn’t figure it out so I made a button with a click detector that served the same purpose as having to get to another point before the timer ran our
@@TechwithMikeYT yo so im trying to implement this with a chest for a timer so like i open the chest and u will have to wait another 1hour to open it again and it shows a little guibillboard on the part and its a proximitypromp and not a touch
Hey Tetch with Mike! I have a bit weird video idea. But this may help with some roleplay games like mine. Could you please make a tool that u can drink? But when u drink it ur screen goes blurry and u have a an effect like your drunk? But the effect lasts for a certain amount of time. Thanks if you read this. By the way i need it for my police rp game so i asked you :)
Omg Lol I was looking for something like this for my game but i forgot now what kind of game I was making. Liking this video so if I remember Ill continue it! Thank youuuuuuuuuuuuu
This is exactly what I needed for my speed running game too.
Please do not stop doing these videos. Your topics are relatable and practical, and your style of teaching is easy to follow. You are always my go to channel when I am researching a topic for Roblox studio.
Thank you.
Thanks!
THAT IS SO TRUE! THIS CHANNEL IS THE BEST
That’s weird, this is exactly what I needed for my game. Thanks!
Same
same
Same lol
Thanks! If you wan't to teleport the player if the time runs out, here is the part you change - player.Character.Humanoid.Health = 0 LowerTorso = player.Character.LowerTorso
LowerTorso.CFrame = game.Workspace.NameOfPartToTeleportTo.CFrame
Nice variation!
I've seen a few people wanting to reverse this. Here's how you would do it:
1. Set time_val to 0
2. Set > 0 to < 10
3. Set "time_num = time_num - 1" to "time_num = time_num -+ 1"
Thanks Mike. You made my Metroid inspired escape sequence more intense!
To people saying the code is outdated, as of 12/28/21, it still works
well as of 1/4/22 it DOESNT work
@@timeanchorgamer527 I guess it sucks to be you then. It still works
it didnt work for me but tbh for the code part I copied it from his description :/
as of 11/15/2023 it still works xD
I did the exact same script up to 35 lines and it doesn't work when I touch it the time shows up but doesn't countdown or do anything
This code seems to have an error where it cannot restart the timer if the player walks back and touches the green part. This can be fixed by adding:
timer_started = false
to the stop_timer function.
EX:
if player.Name == LPlayer.Name then
player.PlayerGui.Timer.Label.Visible = false
completed = true
timer_started = false
end
Is there any way to do this, but the numbers go up until you touch another part?
Dude what's inside the start and stop blocks? this is driving me crazy, thank
Im so excited everytime u make a new video... Because about each tutorial you make could help me in my future games. :)
Thanx a lot this is what I really needed for my game :D
People like you should get more recognition as you are helping the Roblox Community make games!
Glad I could help!
Can you now make a video about a count from 1 to 10 instead of 10 to 1?
You"re amazing! you do topics that I need for my game! Well done.
how to make it a stop watch/timer? like jtoh
Thats what im looking for for like 1 month
thank you! heres the script: (i did 60 seconds, you can change it)
local start = game.Workspace.Start
local stop = game.Workspace.Stop
local time_val = 60
local timer_started = false
local completed = false
local time_label = script.Parent
time_label.Visible = false
local LPlayer = game.Players.LocalPlayer
local function start_Timer(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player.Name == LPlayer.Name and not timer_started then
timer_started = true
time_label.Text = time_val
player.PlayerGui.Timer.Label.Visible = true
local time_num = tonumber(player.PlayerGui.Timer.Label.Text)
while time_num > 0 do
wait(1)
time_num = time_num - 1
player.PlayerGui.Timer.Label.Text = tostring(time_num)
end
if not completed then
player.PlayerGui.Timer.Label.Visible = false
player.Character.Humanoid.Health = 0
end
timer_started = false
completed = false
player.PlayerGui.Timer.Label.Text = time_val
end
end
local function finish_timer(otherPart)
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player.Name == LPlayer.Name then
player.PlayerGui.Timer.Label.Visible = false
completed = true
end
end
start.Touched:Connect(start_Timer)
stop.Touched:Connect(finish_timer)
Thanke so much :D
Edit wow this is epic
Edit 2 second
Edit 3 most edits
E
How to make a Main Menu on the beginning of the game and where u click "Play", "....", "...." and when u move your mouse on bottoms it makes noise and u can customize it. And when you click play there's a typing sentences and it makes keyboard typing noises. Keep up the good work! :)
This is a good script, but I know your tired of questions, but how do you make it count up instead of down?
You add a + instead of a minus, make the greater than 0 a less than 10, and you make the timerValue 0
Basically just reversing the script.
@@heypikachu276 Cool! Thing is that my comment is 8 months old, so I don't need it. Still it is epic.
This is litterally exactly what I needed!
Thanks a million!
Thank u i was trying to make a timer for my game “Bow Auto”
wait(10)
print("good video lol")
= true
That valid lol
cannot index nil with 'good video lol' - Some Random Hater
You are awesome! Thank you so much, this helped a lot!!
Thank you so much mike! I needed this exact script for my game and you delivered! Im dropping a sub.
This is literally exactly what I wanted! Thank you!
in time num = time num - 1, you could do time_num -= 1
What if I wanted it to add time instead of having it be like a normal timer and when it reaches something like 6AM it awards you a badge then kicks you?
How would I change this so that the timer appears for everyone on the server when just one player touches the block?
When I do this but go back to the green part it does a glitchy 10 then it goes back to the number that it was previously at because it is still ticking the numbers even though the countdown isn’t visible anymore
Is there a way to fix this?? Please help
dude this helped so much thx
Dude, U JUST GAVE ME THE BEST IDEA FOR MAY GAME OMG
will it respawn you when the timer is finished pls make a script on that pls
could u make a video on how to make like a clock at the top of your screen?? ((like in bloxburg))
I was gonna make a stopwatch but I can work from this and its a great tutorial by the way
Thank you mike. You’re one of the only coding tutorial channels that work and it’s really helping me make my 2d platformer.
How come it says attempt to index nil with Name’
Thank you! You helped me in a lot of things.
You are the best thanks for helping me out you deserve more subs
How do you make something like when you need 2 players to start the game you dont move and when theres 2 players the game starts
thanks for helping me and good video
its not working for me when i go on the block it doesn't show up
I'm sorry, Mike, it doesn't work, when I touch the Start part the time doesn't shows up. The output says: Touched is not a valid member of Model "Workspace.Start"
hey mate do you know how to adding chekpoint here? so if im touched the brick says checkpoint i will get 10 seconds added time
are you going to be playing some more of your subscribers games? And if so, is there a place i could submit mine?
Yes, please check the community section
How do I make a timer in which it starts at 0, and counts up until the StopBlock is touched? like a time trial
Keep up the good work. :D
This script is great. But I want it to teleport the character after "if not completed", and I can't figure out any way to make it work. I don't want the death. And I'm working on a game jam. So it's really frustrating. *cries in script*
How do it for mouseclick?
would this work in the opposite way of adding more time to the timer instead of counting down instead (speedrun timer)
How would you make it so you could start the timer in a different start and stop?
thanks imma do this but instead of getting to a other pad imma make it a button because im making a tower defense game also imma not use the kill script but instead use a teleprting to game script
Thank you for the timer
doesnt work i clicked this to make it for my new game called assassin Mystery and i needed a timer for a intermission
Thanks buddy apprecioate it!
is there a way u can have multiple timers example on one i want 30 seconds on the other i want 5 seconds please help!!!!!!! @Tech with Mike
AMAZING but for some reason it says my teleport had a error i did make it public its the exact same as YOUR script soo maybe you could tell me what happend or how to debug it?
this actually works
wow thx
HEY! How do i make it so instead of it being from 10 to 0 and instead increasing numbers?
How do you make a counter that tracts time when you step on a block then stops when you go on another block. kinda like that same thing just going up instead of couting down?
that's exactly what l need to. the completely reverse.
Thanks and new sub
Ayo thanks dude
How do u get the red and green button
I dont know how u add start and stop and what to add so the work
me took 36 min to fallow a 11 min tutorial
then i found out the code is aleady copyed in dec 😶
Lol well now you know for future videos!
Hey mike. I hope you see this.. i have a problem and i figure that since we have the same name maybe you could help me out? i have been trying to get my RoundTimer function to show on a Part surface gui insted of a gui on the screen. but i cant seem to wrap my head around it.. is there any way you could help me out?
local replicatedStorage = game:GetService("ReplicatedStorage")
local values = replicatedStorage:WaitForChild("Values")
local status = values:WaitForChild("status")
local text = script.Parent
status.Changed:Connect(function()
text.Text = status.Value
end)
this is a Localscript in the TextLabel in a surfaceGui attached to a part, but it wont change the text
oi again.. i solved the problem by inserting a script insted of Localscript into the surfaceGui as parent and changed the local text = script.parent to this..- local text = script.Parent.Time. so thanks anyway! :D
November 7 2020. The script did not work.
Can you make a timer where it stops when you touch it like a timer
Do you know how to have the timer increase instead of decreasing? Like when you step on platform and then a timer appears except the time goes up every second
here i made one
www.roblox.com/library/7174872693/TimerIncreasing
Is there a way to make a timer so that when you start the game it automatically runs and when the time runs out the timer restarts? If there is can you reply to this message with the script or make a video about it? Thx!
It's a simple while true do loop.
All you need is a "while true do" for a loop. Then you get that to repeat, and it's done.
Also no you do not need a "PlayerAdded"
how do you make it count up??
+ instead of - but if you want it to kill you you will need to keep it minus
wait what is the green and red called
i love you thanksn
how would i make multiple timers
Could you teach us how to script a tool giver but before the person gives the tool to the player they can pick a price and then sell the tool to the player for in game currency (Set by the player giving to the person) like in the game wild west where bartenders can give food to players for money
Suggestion: How to make local music system with mute/unmute song but whenever player dies the music doesn't reset.
PLEASE HELP NOW! ALL THAT HAPPENS IS AS SOON AS YOU SPAWN YOU CAN SEE THE LABEL! and when you go on the block it does nothing
Check the output while testing for error messages
@@TechwithMikeYT what is the output? im new to studio
@@TechwithMikeYT I had a solution. I couldn’t figure it out so I made a button with a click detector that served the same purpose as having to get to another point before the timer ran our
@@TechwithMikeYT yo so im trying to implement this with a chest for a timer so like i open the chest and u will have to wait another 1hour to open it again and it shows a little guibillboard on the part and its a proximitypromp and not a touch
Can you tell me that why did my timer not started, I copied the script which is in discription please tell
Can you check the output while the game is running to see if you have any error messages?
@@TechwithMikeYT thanks, my work is done from toolbox.
rip to me bc i typed the whole thing without knowing there was a link to the code
Extra practice
idk how to put the timer in the explore
Hey can you make a timer that goes up instead of down and stops?
How to make a timer gui that if the time runs out, the player respawns to the spawn?
just get all the children from Players using for loop then movethem to whereever you want
u
Thank you!!!
Do u know how to save it to datastote? So i can use it as global leaderboard data
didnt Start my Time if i Step the Pad but my Script is correct
Can you do it so you can have multiple timers in one server?
Isn’t this a countdown kinda video not a timer?
Can you make a script for chest or presents spawning in 5 mins. I wanna do something like royale high but different
how do you make it into minutes?
Can you do it with a stopwatch
hey tech with mike, i want a timer which starts from 0 and ends when you touch the oehter part
Here I made my own...
get it
www.roblox.com/library/7174872693/TimerIncreasing
This is like a button, u touched a wall disappears then the time runs out and the wall appiers so u cant pass, but this is better! bc it kills u thxx
can u make a vid for a stopwatch instead of a countdown?
I'll try and do something like that
Hey Tetch with Mike! I have a bit weird video idea. But this may help with some roleplay games like mine.
Could you please make a tool that u can drink? But when u drink it ur screen goes blurry and u have a an effect like your drunk? But the effect lasts for a certain amount of time. Thanks if you read this. By the way i need it for my police rp game so i asked you :)
is the screengui sussposed to be "Timer" Or "timer"
nvm
Why does my coding domt work if I do what exactly he did?
Can you check output while the game is running to see if there are error messages?
When I am writing the script and seeing from the script recovery there are no errors but when I am running the game a last , nothing is happening
Can you make a stopwatch?It would be really helpful!
can you make a timer globalboard for the people who finish it
can you make a version where it automaticly starts as soon as you join the game?
You can rename the spawn to Start
@@NotZDH Ok Thanks
Hello There,
can you make a leaderboard, so people see what time other people got
How do I change the time? @Toasted Cardboard - @Tech With Mike
Change this line
local time_val = 10
Thank you mike! I will always use your vids! I subbed and liked every of your vids!