Player = game.Players.LocalPlayer Player.Character:WaitForChild("Humanoid").Died:connect(function() Player:Kick() end)
For some reason,It says that "Character" is nil...?
The character has not loaded yet, try adding this onto line 2:
repeat wait() until Player.Character