Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How To Make An On player Death Teleport To Other Game?

Asked by 5 years ago

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

0
It would probably be more reliable to use the CharacterRemoving event. Wafflecow321 457 — 5y
0
why not Humanoid.Died lunatic5 409 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Died Event Here

hit.Parent.Humanoid.Died:Connect(function()
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    game:GetService("TeleportService"):Teleport(461654058, player)
end)
0
the professor is cringe !! lunatic5 409 — 5y
Ad

Answer this question