I am trying the make a survival game and when you die you go back the the main host game
onPlayerhealth (0)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game:GetService("TeleportService"):Teleport(461654058, player)
end
end

2 comments
It would probably be more reliable to use the CharacterRemoving event.
why not Humanoid.Died