I'm trying to make an intermission timer, and for some reason when I activate the intermission through a touched event trigger, my screen freezes and gives me this output message: " 10:05:45.871 - Script timeout: exhausted allowed execution time" Here is a snipet of my code where the error led me to, if you need the whole script to figure it out, I'll edit this question with the whole script! I know how these types of time outs work, but I put a wait in there, and it doesn't seem like its running much, so I'm confused.
while PTCount >= 2 do local Status = game.ServerStorage.Status local PTChildren = PlayerTable:GetChildren() Status.Value = IntermissionString..IntermissionNumber..IntermissionString2 -- Below this number is where the error led me to IntermissionNumber = IntermissionNumber - 1 wait(1) end
You could just use a for loop for this.
startTime = 0 endTime = 10 increments = 1 for i = startTime, endTime, increments do print("Time: "..i.."/"..endTime end