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

How to move camera using CFrame (script not working)?

Asked by 2 years ago

i have this script:

view source

i have this script:


local cam = game.Workspace.CurrentCamera local FocusPart = game.Workspace.CamPart local player = game.Players.LocalPlayer cam.CameraType = "Scriptable" cam.CFrame =CFrame.new(FocusPart.CFrame,FocusPart.CFrame,FocusPart.CFrame)

it adjusts the camera but not where i want it to be for some reason the camera goes way to the right of where i want it to be

1 answer

Log in to vote
0
Answered by 2 years ago

Maybe try using this:

local cam = game.Workspace.CurrentCamera
local FocusPart = game.Workspace.CamPart

local player = game.Players.LocalPlayer


cam.CameraType = Enum.CameraType.Scriptable


cam.CFrame =CFrame.new(FocusPart.CFrame,FocusPart.CFrame,FocusPart.CFrame)

Try using Enum a little more!

0
ok rabidazara 6 — 2y
0
same result the scriptable part is fine but the CFrame part is not working rabidazara 6 — 2y
0
hmm rabidazara 6 — 2y
0
maybe it could be because the camera cframe stays in the position it was at forever idk ragdollkiiing2 19 — 2y
Ad

Answer this question