So I'm working on an unboxing system for a game. When I test it, studio notifies me to break it, as it's been running for a long time. I don't see any reason why it's hanging. Any help here is appeciated.
for i = 1, 1 do
wait(Speed / 25)
if i == 25 then
Prize.Position = script.Parent.RightHider.Position
Prize.Parent = script.Parent.InvisConveyor
end
FillerTable[i].Position = script.Parent.RightHider.Position
FillerTable[i].Parent = script.Parent.InvisConveyor
local A = script.ThingHandler:Clone()
A.Parent = FillerTable[i]
A.Disabled = false
if i == 30 then
break
end
end
If you must know, Speed is 10 seconds, FillerTable is a table of frames given by the server, RightHider is just an area with higher Z-Index so the user doesnt see items appearing. ThingHandler is just a script to delete the tiles after going past the view. Prize is just a pre-selected prize the user will get.

4 comments
you can't break for loops i do not think
You can break for loops. In fact, it is used in an example in the wikipedia.
The for loop you made is set to act like a do end block. it only repeats once....
him, it still shouldn't hang then crash my studio if it repeats once...