Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I check if the player respawned?

Asked by 5 years ago

I'm currently working on an avatar system but I don't know how do I check if the player respawned!

0
Effort ryan32t 306 — 5y

3 answers

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

For this you'll need to utilize the PlayerAdded and CharacterAdded event on the server end to achieve this.

Here's an example.

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(AddedPlr)
    AddedPlr.CharacterAdded:Connect(function()
    print(AddedPlr.Name, 'has spawned!.')
    end)
end)

Hope this could be any help for you.

Ad
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Use the .CharcterAdded event.

0
Thanks! PixelRankYT 20 — 5y
Log in to vote
0
Answered by 5 years ago

Player.Character.Humanoid.Died or Player.CharacterAdded

Answer this question