Server not loading in time for scripts causing multiple errors

I’m aware that scripts will detect things as nil if they aren’t loaded, but I never thought to check for it until now. and to be honest, I don’t know how.
I have 143 errors when loading my game in roblox. in studio its perfectly fine, but im getting so many errors in roblox.
is there a way I can make all scripts at once wait for the server to load before doing things?

use :waitforchild() function
or
store the script in serverstorage and add them to their respective locations using another script from serverscriptservice

there are multiple different scripts, not just one, ive been working on this game for months and just now felt the need to test it in roblox. not to mention all the gui is completely ruined and scaled weirdly.

Try searching for “autoscale gui”

There are tutorials on usage on Youtube I think.

We need more information. Did you check the developer console to see what’s not being loaded in time?

Crazy idea, but you could make the scripts that rely on other scripts wait a bit before calling them. For the scripts that don’t require other scripts it just instantly works.

If the issue is about parts, vfx, fx, etc just add a wait() or a waiting menu for these things to load in before starting the scripts. The first player to load in really only needs the waiting menu since everything should work.

I was using that, actually. Surprised it suddenly broke.
Here is the difference. if anyone else knows how to fix this
Studio

Roblox

proof i have and was using autoscale gui (but i guess i wasnt using it correctly)
image
image

i really think roblox needs to fix their gui editor, but maybe its just me.

Soo likee

repeat
task.wait()
until game:IsLoaded()

in every script could work? i saw this on another post but im just dreading the feeling editing all the scripts in the game. Like I said ive been working on this game for months, theres multiple scripts

edit: i just tested it out, the script waits indefinitely

edit 2: I figured out it only works in locals scripts. Do you think I could have this in a local script then fire and event to the server the server?

Edit 2 worked! Probably not the most convenient, but it works. Its better than editing every value in every script

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.