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

"ALIVE is not a valid member of Backpack "Players.Hack999kh.Backpack" when it is can someone help?

Asked by 2 years ago

I have a boolvalue thats ment to set its value to true when the game starts but I get the error "ALIVE is not a valid member of Backpack "Players.Hack999kh.Backpack" every time i test it

        for i,v in pairs(game.Players:GetPlayers()) do
            v.Backpack.ALIVE = true
        end

thats the script I've changed the name but still nothing works https://i.imgur.com/CBkHvLf.png

1 answer

Log in to vote
1
Answered by
Neatwyy 123
2 years ago
Edited 2 years ago

This is probably because the BoolValue has not loaded in yet. You could fix this by using :WaitForChild(). By the way you forgot the .Value!

for i, v in pairs(game.Players:GetPlayers()) do
    v.Backpack:WaitForChild("ALIVE").Value = true
end
Ad

Answer this question