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

Camera Manipulation help?

I am trying to make it so the camera will look at the top of a part and be stuck their. This is what I have but it looks at the side of the part and it doesn't lock at the position.

local player = game.Players.LocalPlayer
repeat wait(1) until game.Workspace.Players:FindFirstChild(player.Name.."sprite")
local camera = game.Workspace.CurrentCamera
camera.CameraSubject=game.Workspace.Players:FindFirstChild(player.Name.."sprite")
camera.CameraType = "Attach"
camera.Focus=CFrame.new(game.Workspace.Players:FindFirstChild(player.Name.."sprite").Position)
camera.CoordinateFrame = CFrame.new(game.Workspace.Players:FindFirstChild(player.Name.."sprite").Position)
                         * CFrame.new(0, 0, 5) 

2 comments

0

Try changing the "CFrame.new(0, 0, 5)" at the end to "CFrame.new(0, 5, 0)".

0

Thanks, anyway I can lock the camera so it cant move?

1 answer

game:GetService('Players').LocalPlayer.CurrentCamera.CameraType = Enum.CameraType.Fixed

This fixes the camera in one place

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