So basically i want to make a script that deletes their character as soon as they die , but i don't even know where to start, i investigated and the only thing i've got is Humanoid.Died, but i want to script this so this works with anyone that has died, thank you.
✓ ANSWER ACCEPTED
How would i make a script that runs when anyone dies in the game?
1 answer
✓ Accepted answer
I think if I understood what you're trying to accomplish a little better I could be of more help, but I would use the Humanoid.Died event as you mentioned.
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
character:Destroy()
end)
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
https://developer.roblox.com/en-us/onboarding