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)
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)