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

Hello, again can you help me? if player died then they get be deleted from Players! Why and how?

Asked by 1 year ago

Hello, again can you help me? if player died then they get be deleted from Players! Why and how?

This is my script:


game.Players.PlayerAdded:Connect(function(Player) Player.CharacterAdded:Connect(function(Character) Character.Humanoid.Died:Connect(function()

        if Player:FindFirstChild("Survivor") then
            Player.Survivor:Destroy()
            local D = Instance.new("BoolValue")
            D.Name = "Dead"
            D.Parent = Player.Character
        elseif Player:FindFirstChild("Killer") then
            Player.Killer:Destroy()
        end

        wait(1)

        Player.PlayerGui.Gui.GameFrame.Visible = false
        Player.PlayerGui.Gui.MenuFrame.Visible = true
        Player.CameraMode = Enum.CameraMode.Classic

    end)
end)

end)


1 answer

Log in to vote
0
Answered by 1 year ago

Ohh, sorry i writed (v:destroy (v = player)) it to gamelogic script xD

Ad

Answer this question