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

Why does this say attempted to index nil with parent?

Asked by 3 years ago
local Players = game:GetService("Players")
local Player = game.Players:FindFirstChildWhichIsA("Player")
wait(5)
wait(5)
repeat wait() until Player.Endings.World.Value == 2 --Endings is a folder inside of player and world is a value inside of that folder
--rest of code
0
you don't reference a parent anywhere in these lines. can we see the rest of the script? OfficerBrah 494 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Put wait(5) at the top of the code, i think your script runs before the players even are in the game and so it index nil.

Ad

Answer this question