I want to make a script that when a player respawn, the script is actived, but I don’t know how to make this.
(I already tried to search in devforum/youtube/google)
I want to make a script that when a player respawn, the script is actived, but I don’t know how to make this.
(I already tried to search in devforum/youtube/google)
Do you want code to be ran when someone respawns? There are 2 way syou could do it. Have a script in StarterCharacterScripts that gets replicated on respawn, or use the CharacterAdded event
game:GetService("Players").PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Wait() -- So it doesn't happen first time, you can remove it
plr.CharacterAdded:Connect(function(char)
--Code to do
end)
end)