Hey! I need help making a script that kills the player when they spawn in.
I’ve done lots of research but I can’t find what I’m looking for.
The script must only apply to the person who is spawning not anyone else in the server.
Using WaitForChild() on the character is ineffective. The server should wait until it gets the character of the player.
game.Players.PlayerAdded:Connect(function(player)
repeat
wait()
until player.Character
local character = player.Character
character:WaitForChild("Humanoid").Health = 0
end)