What do you want to achieve? Keep it simple and clear!
I want to make it so when you die you get a point called “Deaths”
What is the issue? Include screenshots / videos if possible!
But it only works for 1 player in server here is the script
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
Deaths.Value += 1 --For some reason it only works for 1 player in server
game.ReplicatedStorage.ServerOofs.Value += 1 --Same for this one (Server oofs is a value that counts how many people died in this server in total)
end)
end)
As you can see the second player that joined the server resetted but they didn’t get a death
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I did but nothing helped.
It does work in lua since the death counter works but only for 1 player try this script for proof
local counter = 0 --Make a variable called counter
while wait(5) do --Make a loop
counter += 1 --Increase the variable called counter by 1 by using +=
print(counter) --Print the counter variable's value
end
I tried it with 3 players, and it still works when they fall off. If it still doesn’t work for you, try using Player.CharacterRemoved instead of Humanoid.Died.