My game froze when I try to join it

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.

Here is the video: Screen capture - 0d19bb99bdeeda6ce6efb451dbe5e270 - Gyazo (I don’t know if you can see the problem I cut little bit cause video can only be 7 seconds long)

1 Like

Does your game include terrain?

Do you have a script that doesn’t include a wait() in a loop that might be causing you these issues?

Yes I have,in police lights but it didn’t cause this before tho.

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.

The thing is. I didn’t use any free models. And I checked the workspace there is no virus. And I don’t have particles.

Can you send like a picture of your explorer?


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.

I had that problem before, the reason was that i had LocalScripts with Loops:
Ex.: while true do end

without any wait[], it will freeze ur game. you should find them in StarterGui, StarterPack, StarterPlayer etcetera

1 Like

hm i think there might be a script not allowing you to join the game or roblox is not letting you i don’t see anything wrong with what you are doing.

1 Like

that would make sense on why it does not work.

1 Like

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.


So I have loop script for Police Cars lights,in team change I don’t have any loop,just in car dealership,police cars lights and fire fighters.

local L = script.Parent

while true do
  if L.on.Value == true then
      L.F1.Transparency = 0
      L.F2.Transparency = 1
      L.F1.Transparency = 1
      L.F2.Transparency = 0

Basic script for lights.

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.

I tested game in studio,everything is normal. But when I tested it on roblox I can’t even join.

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.

Hmm,should I use like function if value is changed then it runs the police lights,etc?

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.

1 Like