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

My camera manipulation is not working?

Asked by
AdibH 0
6 years ago

I have been learning lua for a small time and this week I picked up Camera manipulation. But for some reason my script is not working. There are no Outputs as well. Take a look at the script.

local cam = workspace.CurrentCamera

cam.CameraType = "Scriptable"

cam.CoordinateFrame = CFrame.new(-152.2, 40, 186.6)

cam.Focus = CFrame.new(36.4, 1, 145.2)

2 answers

Log in to vote
0
Answered by
Bertox 159
6 years ago
Edited 6 years ago
wait() --important, a player needs to load first

local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable --i always use Enum, I think it's better
cam.CFrame = CFrame.new(-152.2, 40, 186.6) --you can just use CFrame

--Focus is not for CFrame, its for Objects!

Example:

cam.Focus = game.Workspace.Part

That should work^^

0
@Bertox, thanks, but the Focus says, "Cframe expected, got object" AdibH 0 — 6y
0
Oh, sorry Bertox 159 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
cam.CoordinateFrame = game.Workspace.[Put block its on here].CFrame* CFrame.Angles(-152.2, 40, 186.6)
0
You probably copied it from somewhere, and that wasn't his question Bertox 159 — 6y

Answer this question