Today I published a new update including new stages etc. for my randomized obby game, however, whenever I touch a union of bricks i made, the game just freezes and i have to alt+f4 to leave. Is this a common issue? Does anyone know why this could be happening and how to fix it?
The union itself has no script, the only script that has something related to it is the randomizing script that changes the cancollide to true and transparency to 0 when the stage gets chosen.(and cancollide to false back again and transparency back to 1 obviously)
Just what I expected. Check that script(especially while loops and repeat loops) and see if those loops have wait() in them. If not then add a wait(–time waited).
Well in a while or repeat loop, you don’t know how much times it will loop(maybe infinity idk). Because the computer runs commands fast so it will get that error. wait() delay the script for a certain amount of time so it won’t error.
I only see no wait() in my main while true do, but inside that are only a few if statements and all of those have their own wait() so that shouldn’t be a problem right?
If you want the children, do a pairs loop. You don’t really want to put anything inside of :GetChildren() as it just returns a table with all children of a given instance.
Except for the upgrade of the script using in pairs loop, do you have any idea why the game is freezing right when i touch the union even though there’s no function connected to touching it?