This is a timer that counts from 300 to 0. I intended to have a wait() of 1, but when I used that, each second was around 3 seconds (I compared it to Google timers).
What is with this delay?
workspace.TimerOn.Changed:connect(function()
for timer = 300, 0, -1 do
if workspace.TimerOn.Value == true then
script.Parent.Text = tostring(timer)
wait(0.25) -- I changed the wait to 0.25 to correct the time
end
end
end)
script.Parent.Changed:connect(function()
if game.Workspace.TimerOn.Value == true and script.Parent.Text == "0" then
-- fire an event when timer is at 0
end
end)

2 comments
Check for vírus (infections) in your game. Their scripts delay the execution of the ones you really need; They do hurt wait() times aswell. I already worked on a game with 3000+ infections, and the performance impact was huge, not to say the weight of the files.
I checked Script Performance, and nothing out of my knowledge was hogging CPU space, I don't think there are infections in my game.