I want to achieve something very simple that I have done multiple of times before.
I just want to add a value into the player when he gets added into the game but for some unknown reasons It does not do it. Is there anything did wrong? please let me know.
game.Players.PlayerAdded:Connect(function(player)
print(player)
local canDamage = Instance.new("BoolValue")
canDamage.Name = "canDamage"
canDamage.Parent = player
print(player)
canDamage.Value = false
end)
function sussify(p)
--ur player script thingy
end
-- firing all the player exist [first player]
table.foreach(game.Players, function(i, p) sussify(p) end))
game.Players.PlayerAdded:Connect(sussify)
function sussify(p)
--ur player script thingy
end
-- firing all the player exist [first player]
table.foreach(game.Players:GetPlayers(), function(i, p) sussify(p) end))
game.Players.PlayerAdded:Connect(sussify)