Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a way to check if the player respawns?

I know that with the humanoid.Died event you can check if the player dies, but is there a way to check when the player respawns? For example, let's say you have a ScreenGui that one player sees everytime he/she respawns. With the humanoid.Died event, this would show the Gui when the player is still in it's split form after dying, but would there be a way to show it after the player is respawned?

So basically, my question is: is there a way to check if a certain player respawns?

I am fairly new to scripting, so I would appreciate your help!

2 answers

✓ Accepted answer
player.CharacterAdded:connect(function()
 ---code
end)

This will check for when the player joins and respawns.

3 comments

0

Would there be a way to check it only when a player respawns and not joining too?

0

hm great question, add a debounce of some sort maybe? Like when they die it gets activated and then the characteradded even can fire.

0

Oh my gosh! Thank you so much for telling me, I did what you said and it helped a lot!

To check when a player has respawned, use the CharacterAdded event. It returns the character once spawned.

plr.CharacterAdded:connect(function(chr)
	print(chr.Name.. " has spawned!")
end)

Hope I've helped, have a wonderful day!

This discussion is preserved as it was. New answers, comments, and votes are closed.