Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

My game is broken with no changes from yesterday. What's going on?

Asked by 6 years ago

In my game, I store events and other values in a folder in a player's backpack. The folder is called "Values." I commonly use WaitForChild("Values") in scripts just in case the player takes a long time to load.

When I test the game with a server in Studio, the folder "Values" is clearly visible for both the server and the client, but most of the scripts in my game don't seem to see it. I get Infinite yield possible on Players.Player1.Backpack:WaitForChild("Values") and it never goes through.

Again, I can see it in the Explorer on both Server and Client, and the game was working fine yesterday. What is going on?

0
Try re-working your pathway for Values. Maybe you moved the folder realizing or you forgot to add another parent to your network. It seems odd. Just assuming Audiimo 105 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

its probably because either "Values" dosen't exist or it hasn't loaded yet try putting a wait() before the Players.Player1.Backpack:WaitForChild("Values")

0
Well isn't the :WaitForChild() function specifically used for waiting until something loads? SuperMario9595 150 — 6y
0
there is another argument you can do Players.Player1.Backpack:WaitForChild("Values", 100) 100 is the time until it times out but ive never used it mattchew1010 396 — 6y
Ad

Answer this question