How to add a boolvalue to a player when he/she joins?

Does anyone know how to add a boolvalue to a player when they join. I know it has something to do with PlayerAdded but I can’t think of a script

2 Likes

Like this?

game.Players.PlayerAdded:Connect(function(p)
	Instance.new("BoolValue", p)
end)
1 Like

is there a way to name the bool value?

game.Players.PlayerAdded:Connect(function(NewPlayer)
	local Bool = Instance.new("BoolValue")
    Bool.Name = "TestBool"
    Bool.Parent = NewPlayer
end)
1 Like
game.Players.PlayerAdded:Connect(function(p)
	local bool = Instance.new("BoolValue")
	bool.Name = "BoolValue"
    bool.Parent = p
end)
2 Likes

Thank you! It worked (characters)

1 Like

Don’t use Instance.new() with parent argument

1 Like