So yeah thats basically it, thanks
COMMUNITY QUESTION
is there any function that detects if a player dies or resets?
1 answer
Yes, and It's a event of Humanoid called .Died.
You can use this event in both server and client script.
Example:
local Players = game:GetService('Players')
Players.PlayerAdded:Connect(function(plr))
plr.CharacterAdded:Connect(function(char)
repeat task.wait() until plr.Character -- checks when character is child of player.
char.Humanoid.Died:Connect(function()
print('player '..plr.Name..' died!'
end)
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
