This basically just means the script is trying to run, but something is stopping it/not letting it run. So, it “gives up” because it exhausted the amount of time to perform its function.
You will get this error if you are spamming the script (think a while true loop without a “wait()”)
Several other topics about this:
I have a long running script that performs a minimax search of a game tree.
Testing locally, it looks like my script gets killed after ~20 seconds and I get the error “Script timeout: exhausted allowed execution time”. I assume this would happen on production also.
What is the best way to handle this? I don’t really understand how script execution works in Lua. I think there are actually two problems:
My long running script is probably blocking all other scripts from running. Is there a way …
So I was using a while true do loop to rotate “handles” for a shop inventory. Of course this means that all the handles are rotated simultaneously, as I can’t seem to find a way to rotate a specific handle if that viewport frame for the handle was open. Anyways I have a large amount of handles, and a simple loop had resulted in this error.
script timeout: exhaustion allowed execution time
When I opened up the shop, studio literally froze for around 10 seconds. Why is this? Is it because my loo…
Hello, when I try to run my script
local Target = game.ReplicatedStorage.NPC
local Script = game.ReplicatedStorage.NPC:WaitForChild("Script")
function onTouched(hit)
if game.Workspace.Value.Value == 1 then
Target.Parent = game.Workspace
Script.Disabled = false
wait(0.50)
Target.Parent = game.ReplicatedStorage
Script.Disabled = true
script.Disabled = true
wait()
end
end
script.Parent.Touched:connect(onTouched)
it freezes my testing window and says “Script timeout: exhausted all…
I’m doing something that takes a long time for a script to process and I need the script, not to TimeOut.
when I try to set the Script Timeout I get an error.
Players.ffancyaxax12.PlayerGui.LocalScript:11: attempt to index nil with ‘SetTimeout’
local scriptContext = game:GetService("ScriptContext")
scriptContex:SetTimeout(100)
Even though its on the Roblox DevFourm.
https://developer.roblox.com/en-us/api-reference/function/ScriptContext/SetTimeout
2 Likes