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

[SIMPLE] Why is this camera scriptable position + lookvector not working?

Asked by 8 years ago

I'm just trying to get the camera to look at something and not have the player able to move the camera around.

local cam       = game.Workspace.CurrentCamera
local target    = workspace.CameraTarget
local position  = workspace.CameraPosition

cam.CameraType = 'Scriptable'
cam.CoordinateFrame = CFrame.new(target.Position, position.CFrame.p)
0
Try removing the second parameter. CFrame also accepts vector3 values, so you should be fine Shawnyg 4330 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

CFrame only accepts one value, you can your ~~~~~~~~~~~~~~~~~ Vector3.new(target.Position, position.CFrame.p) ~~~~~~~~~~~~~~~~~ instead!

Ad

Answer this question