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

Help with kick player on death script please?

I think i got something wrong. I put this local script into Players but it's not working. No errors in the output.

local Players = game:GetService('Players')
local Player = Players.LocalPlayer
local humanoid = Player:WaitForChild("Humanoid")


humanoid.Died:Connect(function()
	Player:Kick("you died")
end)

1 answer

✓ Accepted answer

put the following Local script in Starter CharacterScripts and use the following code. It would surely work.

local player = game.Players.LocalPlayer
local Humanoid = player.Character.Humanoid

Humanoid.Died:Connect(function()
	
	player:Kick("You Died")
	
	
end)

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