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

Humanoid.Died doesnt work any way that i try to use it?

Asked by 2 years ago

How could i use the humanoid.died function properly, because currently it doesnt work at all, and before it used to work on the second time i reset my character.

This is the code right now:

game.Players.PlayerAdded:Connect(function(Player)
    workspace[Player.Name].Humanoid.Died:Connect(function()
        camera:MoveTo(game.Workspace.EndPart.CFrame)
        camera:PointTo(game.Workspace.FocusPart.CFrame)
        camera:SetFOV(70)
    end)
end)

i want it to basically just run this line

        camera:MoveTo(game.Workspace.EndPart.CFrame)
        camera:PointTo(game.Workspace.FocusPart.CFrame)
        camera:SetFOV(70)

every time the player dies

0
is there an error somewhere? R_LabradorRetriever 198 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

I fixed it by using OnCharacterAdded()

Ad

Answer this question