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

Camera Manipulation script wont work?

Asked by 7 years ago
part = workspace:WaitForChild("Part")
Pos = workspace:WaitForChild("Pos")
Pos.CFrame = CFrame.new(Pos.Position,part.Position)
cam = workspace.CurrentCamera
cam.CameraType = "Scriptable"
cam.CoordinateFrame = CFrame.new(Pos.Position)

This is in a local script in starterGui.The part is supposed to represent what I am looking at. Pos is where the camera is. The 3rd line points the camera towards part. I am unsure why this does not work.

1 answer

Log in to vote
0
Answered by 7 years ago

You forgot an important step, you need to set the cameras subject. EXAMPLE:

cam.CameraSubject = part

http://wiki.roblox.com/index.php?title=API:Class/Camera/CameraSubject

0
I added that it still doesnt work shabbs15 67 — 7y
Ad

Answer this question