Hello. I’m working on my game for quite a while and It was time to release it. But now when I try to join it It don’t want to load and roblox froze. Please is there any solutions. Also I scripted every script,didn’t use any free models.
that happens when there’s too many free models with viruses in them, making it so the game doesn’t know what to do, and crashes your desktop. or you have a lot of particles. those also cause issues.
Quick update: Cause reverting the game I got my game to work but now if I change my team game freezes.Tried trough button change and also trough developer console nothing,game freezes.
Any script with a loop and no wait() will cause this issue, as I mentioned in the 3rd post.
They can be found in any area of the game and once they are run they will cause the game to freeze.
@MasterDiagnose check the team change script carefully, or you can post it here so we can look through it.
Just remember to include 3 ` marks (backwards single quote) before and after posting the script to format it correctly so we can read it easily.
local L = script.Parent
while true do
wait()
if L.on.Value == true then
L.F1.Transparency = 0
L.F2.Transparency = 1
wait(0.1)
L.F1.Transparency = 1
L.F2.Transparency = 0
wait(0.1)
end
end
You might need to consider testing the game in Studio. If it freezes there, it will likely return an error, as while loops are one of the only things that can really stop a game from launching.
It doesn’t look like this while true do loop would freeze your game but I’d look at making this loop a function that only runs when the Lights are turned on.
Your “while true do” loop is always running whether the lights are on or off, and has the wait() always affecting the performance of your game. If you put it into a function that’s only called when the lights are on you could get rid of the wait() and just rely on the 2 wait(0.1) lines inside the loop to keep it from freezing up your game.
Yes,
If L.on.Value = true then call the function to go through the lights on/off cycling loop rather than continuously running the while true do wait() loop.