Hello! So Im trying to make a Elimination game, Ok neverminded by now you get the point if you saw my last post... Lastly, Im trying to make it so when the player dies they get kicked from the game, here’s the current script to check if the player died lol
while true do
game.Players.LocalPlayer.Died:Connect(function(player)
print("An maybe idiotic player named: "..player.Name.." Has died. Maybe lag or mcdonalds wifi, idk...")
player:Kick("Dude you died you big dum dum!")
print("The player has been Kicked!")
end)
end
while true do
wait()
if game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
print("An maybe idiotic player named: ".. game.Players.LocalPlayer.Name.." Has died. Maybe lag or mcdonalds wifi, idk...")
game.Players.LocalPlayer:Kick("Dude you died you big dum dum!")
print("The player has been Kicked!")
end
end
while true do wait()
if game.Players.LocalPlayer.Character.Humanoid.Health == 0 then
print("An maybe idiotic player named: "..player.Name.." Has died. Maybe lag or mcdonalds wifi, idk...")
game.Players.LocalPlayer:Kick("Dude you died you big dum dum!")
print("The player has been Kicked!")
end
end
Hey! This script should be helpful to you. It should be a server script and preferably placed in ServerScriptService. You could make this a local script which only listens to characters of the client that then kicks itself, but that is vulnerable to manipulation.
Essentially, we check for whenever a player joins and then listen to when a character is added for said player! When that character dies, we kick the player associated with the character!
If you need any more clarification with how it works, let me know!