Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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 comment

1 answer

✓ Accepted answer

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)

1 comment

0

Works! Thanks alot :D

This discussion is preserved as it was. New answers, comments, and votes are closed.