local player = game:GetService(“Players”)
for _, v in pairs (player:GetPlayers()) do
local deathCounter = Instance.new(“IntValue”)
deathCounter.Name = “DeathCounter”
deathCounter.Parent = v
end
what i need to happen is when a player dies, their deathCounter value should go up by one. How do i make this happen? Also should this be in a local script or server script? Thanks!

3 comments
um, I think you forget to put the deathCounter’s parent
He set the parent of deathCounter on line 2. Instance.new() has an second argument which is the parent of that Instance, so on line 2, he's creating the 'IntValue' and the second argument is the parent of that Instance, so he's setting the IntValue's parent to the player.
ah yes sorry. Thanks!