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

How do I fix error: attempt to index nil with 'WaitForChild'?

Asked by 4 years ago
01-- Define variables
02 
03local Replicated = game:GetService("ReplicatedStorage")
04 
05local ServerStorage = game:GetService("ServerStorage")
06 
07local MapsFolder = ServerStorage:WaitForChild("Maps")
08 
09local Status = ReplicatedStorage:WaitForChild("Status")
10 
11local GameLength = 500
12 
13local reward = 50
14 
15-- Game loop
View all 46 lines...

1 answer

Log in to vote
0
Answered by
ew_001 58
4 years ago

You did not give us the line hwere the error is, but i found it myself.

On line 9, ReplicatedStorage is not a valid varible, but Replicated is. Try to replace ReplicatedStorage with Replicated, as that is how you have written the varibles.

I hope this helps!

Ad

Answer this question