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

Why won't my camera get moved to this part when I play the game?

Asked by 3 years ago
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CameraSubject = game.Workspace.TestingPart

The camera just spawns on the floor...

0
I have this on a local script, by the way. ArcanZus 61 — 3y
1
camera.CFrame. DeceptiveCaster 3761 — 3y

1 answer

Log in to vote
1
Answered by
DollorLua 235 Moderation Voter
3 years ago

I rarily use camera.CameraSubject, and when I do I usually leave the camera as custom (for spectating functions)

The camera has a "CFrame" property (as DeceptiveCaster said). I'm pretty sure you know what CFrame is, but just in case, its a way to position with orientation (smallest breakdown I could think of)

you could try

camera.CFrame = workspace.TestingPart.CFrame - Vector3.new(3, -3, 0) -- subtract a vector 3 to *attempt* to get it looking at the part.
Ad

Answer this question