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

Camera Manipulation help?

Asked by 9 years ago

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) 
0
Try changing the "CFrame.new(0, 0, 5)" at the end to "CFrame.new(0, 5, 0)". GoldenPhysics 474 — 9y
0
Thanks, anyway I can lock the camera so it cant move? haydebug2003 -5 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
game:GetService('Players').LocalPlayer.CurrentCamera.CameraType = Enum.CameraType.Fixed

This fixes the camera in one place

Ad

Answer this question