[Play Bug] I can't get into my game

Hello.

This has been happening for weeks now. I can’t test my game in ROBLOX studio, nor can I play in in the ROBLOX app. No DevForum posts are helping. However, I can play any other game without being stuck on the loading screen, but this just doesnt apply to my game. It’s always stuck on the loading screen, and I can’t even test it in Studio.

I tried reinstalling both, restarting my computer, re-installing the app, reconnecting to Wi-Fi, but nothing helps.

1 Like

Send me the game link?

1 Like

I’ve given you playing access.

2 Likes

Do you have any while true do loops running?

1 Like

Yes, for all highway lamps and a few other lights.

1 Like

Yep, that’s gonna crash it, you cant do that. Try removing the lamps and then try.

1 Like

Okay, so now I’m able to test out the game in Studio, but I can’t play it from the app on any device.

Remove all While True Do, loops, I had a situation similar to you a while a go, it’s a script that is running super fast causes the servers to slow.

What if some while true loops are needed? Should I replace them with while wait() ?

What wile true do loops are you using them for?

Custom health UI display, needs to continuously check for player health status. Another is needed to actively check which team the user is on.

For the team, loop. And custom health Ui, don’t worry.

Hi, if you are using mass while true do loops, your game will more likely instant crash, the reason for that is the server can’t handle so many loops when you join, you should put a wait(5) with example
so it’s give you time to join as @Noah said before.

1 Like

Using a wait function on the health UI causes the whole game to go into slow-motion…

Try disabling the Health UI.

I’m getting a lot of errors which I have no clue how to resolve.

Infinite Yield Error:

For example your workspace looks like this:

  • Workspace

    • NPC
  • Server Script Service

    • Main_Code

And Inside of your Main_Code script it has this:

local part = game.Workspace:WaitForChild(NPC)

No errors would occur, however, if your code looked like this:

local part = game.Workspace:WaitForChild(cookie)

It would come up with the error, "Infinite Yeild Possible on ‘game.Workspace.cookie’.


Script Timeout Error:

You’ve probably encountered one of the protections that Roblox has in place for long running scripts.
It occurs when a script runs longer than a predefined ‘timeout’ setting in seconds without yielding. When this happens, it usually causes the game to freeze for a couple seconds.

Are you experiencing this freezing?

If not, it is probably something else.

If you are experiencing the freezing, then it is likely caused by an infinite loop without waits.

In some cases you need to perform a heavy calculation which can take longer than the timeout. If this is the case, then I’d recommend adding some wait()'s at strategic locations and performing the calculation over a longer period of time.


Attempt to concatenate string with instance:

This occurs when you try to print a model or part in the game.

E.g:

This would cause an error:

print(game.Players.LocalPlayer)

Yet this wouldn’t:

print(game.Players.LocalPlayer)

**MenuGui is not a valid member of PlayerGui: **

E.g your explorer looks like this:

  • StarterGui
    • Frame
      • Code

Inside your code, running this would lead to an error as the instance “Rocket” does not exsist:

script.Parent.Rocket:Destroy()

This would work:

script.Parent.Frame:Destroy()

This is the same concept for Membership is not a valid member of Players


Invalid argument #1 to ‘ipairs’:

Ok, this happens as your trying to call a table that doesn’t exist.

E.g:

This would cause an error:


for i, v in ipairs(Data ) do
  print(i, v)
end

This would work:

local Data = {'Boo','Eek'}

for i, v in ipairs(Data ) do
  print(i, v)
end

I hope this helped, enjoy!

1 Like

Make sure there are no lopos that don’t have waits.

1 Like

This seems all fine, but still an error shows up. What am I doing wrong here

What actually is the parent?