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
1 | for i,v in pairs (game.Players:GetPlayers()) do |
2 | v.Backpack.ALIVE = true |
3 | end |
thats the script I've changed the name but still nothing works https://i.imgur.com/CBkHvLf.png
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!
1 | for i, v in pairs (game.Players:GetPlayers()) do |
2 | v.Backpack:WaitForChild( "ALIVE" ).Value = true |
3 | end |