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

How would i make it so the camera faces down on the player then move towards it?

Asked by 7 years ago

I recently made this script, which when you click Begin Game, it will move the camera to different places 3 times. It works but how would i make it so on the last scene it will look down towards the player and lerp towards the players head. Only need it to look down at the player, everything else is done

    character:MoveTo(game.Workspace:WaitForChild("SpawnPart").Position)
for progress = 0, 1, 0.015 do
    local rcamera = game.Workspace.SpawnArea:WaitForChild("CameraPart")
    local seccamera = game.Workspace:WaitForChild("SecondaryCamera").CFrame
rcamera.CFrame = start:lerp(seccamera, progress)
camera.CoordinateFrame = CFrame.new(spawnmodel.Position)

wait(0.025)
end
for progress = 0, 1, 0.015 do
    local rcamera = game.Workspace.SpawnArea:WaitForChild("CameraPart")
    local thirdcamera = game.Workspace:WaitForChild("ThirdCamera").CFrame
rcamera.CFrame = second.CFrame:lerp(thirdcamera, progress)
camera.CoordinateFrame = CFrame.new(spawnmodel.Position)

wait(0.01)
end

for progress = 0, 1, 0.015 do
    local rcamera = game.Workspace.SpawnArea:WaitForChild("CameraPart")
    local playerhead = character:WaitForChild("Head").CFrame
rcamera.CFrame = third.CFrame:lerp(playerhead * CFrame.new(0, 2, 0), progress)
camera.CoordinateFrame = CFrame.new(spawnmodel.Position)

wait(0.001)
end

1 answer

Log in to vote
0
Answered by
Xiousa 156
7 years ago

To have the camera look down at the player, just do camera.CFrame = CFrame.new(PositionThatYouWant, PositionToLookAt).

In this case, it would be camera.CFrame = CFrame.new(rcamera.CFrame.p, playerhead.p)

0
Works! Thanks alot :D xXOverLord34Xx 8 — 7y
Ad

Answer this question