Game crashes my PC

Hello!
Currently, there is a bug in Roblox, where a game just crashes instead of loading. All scripts in the game are made by me.
**NOTICE: Stop touching my title!

GAME: (2) Stay in the game and flex your time *broken game t - Roblox
Does anybody know a fix to this?

1 Like

There are many factors that can crash your game:

  1. Viruses
  2. Loops

Since you said that the scripts in the game are all made by you, then you might be using many loops or an infinite one without a delay that blocks it from freezing the game.

Also, check all the scripts again and make sure there’s nothing called ā€˜Vaccine’ in your game. Viruses can be given by plugins too, so check that there isn’t any Plugin made by unofficial groups like Creator Studio.

No viruses, I’m sure. I will be checking my stuff because there is an elevator from the workspace that doesn’t have viruses, but a lot of ā€œInfinite Yields Possible @ā€ warnings.

Idk why tho, but I believe its the loops, as what @ScripterHumanoid have mentioned.

Did you add wait commands in it, because if you didn’t then Roblox Studio will run the same loop so fast at infinite speed that the entire game and unfortunately your PC will freeze and crash

Actually iirc instead of doing that the loops just break and return an error message, so that can’t be what’s causing it to crash

(2) High-Rise KONE Mono Space Elevator - Roblox This is the only free model in the entire game.
Could these 2 be a problem?

while true do
	
script.Parent.Text =	math.floor(script.Parent.Parent.Parent.Parent.Parent.Parent.Character.HumanoidRootPart.Velocity.Y)
wait()
end

print("loaded")
while true do
	game:GetService'Lighting':ClearAllChildren()
end
print ("lighting cleared")
print ("destroying...")
script:Destroy()
1 Like

Get rid of the second script, looks like a backdoor and it has a no yield loop

It isn’t, I got it from VelocityCounter broken - #22 by heII_ish I juist added the prints to make sure it was running.
This is what happens when I launch it from studio.


image and somwthing does tell me it’s not getting past the loop. also, i cant because it added them back when you enter the game.

Well then add a wait() to the loop. What are you trying to do with that script? If you just want to get rid of everything in lighting you can just go there in studio and delete everything

You should never use an infinite loop (while true do) without a wait()

The script never gets past the loop because the loop never breaks. While the script is looping it halts and only continues when it stops looping, which will never happen if the condition is always true

Deleting the

while true do

fixed it all together.