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

How to make camera not follow the player when the player dies?

Asked by 6 years ago

I want to make the player when he die, the camera not follow the body of the player.

1 answer

Log in to vote
0
Answered by
theCJarmy7 1293 Moderation Voter
6 years ago

One way to do this would be to change the camera's CameraType. In a LocalScript:

local humanoid = thePlayer'sHumanoid
humanoid.Died:connect(function()
    local camera = game.Workspace.CurrentCamera
    -- get the players camera
    camera.CameraType = Enum.CameraType.Fixed
    -- I'm not sure if that's exactly it, you might to change that a bit
end)

And now, when the player dies, the camera will (hopefully) remain in a fixed position.

Ad

Answer this question