Script timeout: exhausted allowed execution time - Server - Script:3

Hello! My 3rd line in this script gives me the output “Script timeout: exhausted allowed execution time”

This is the script:

local TeleportService = game:GetService("TeleportService")

while true do -- this is the line that gives rthe error
	
	for i = 1,15,-1 do
		script.Parent.Parent.Lane1Count.BillboardGui.Count.Text = "Leaving in "..i.." seconds!"
		wait(1)
	end
end
1 Like

also if i do “while wait(1)” instead it have no errors it just doesnt work

Please add .wait() or task.wait() in while loops. The reason “exhausted allowed execution time” occured because the loop are repeating infinitely.

I fixed by changing the numbers in the for loop!

there is literally a wait are u blind and I literally said 7 minutes ago I fixed it

Just an advise mate, sometime Roblox Studio/Roblox crash because of not putting wait() or task.wait() inside a while loop.

I know lol I worked with scripting for multiple years

1 Like

but thanks for the advise and wish u a great day

1 Like

Wish ya having a great days to mate.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.