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

How do i move the camera to a position, but without using a part for the camera to focus on?

Asked by 6 years ago

I want the Camera to go to a position, but without the camera having to be attached to a part.

This is my code:

workspace.CurrentCamera.CoordinateFrame = CFrame.new(-1.244, 13.6, 41.715)

It worked, but it only rotated the camera. I also tried this:

workspace.CurrentCamera.CoordinateFrame = CFrame.new(Vector3.new(-1.244, 13.6, 41.715))

That didn't work like i wanted it to again, it rotated the camera again so i tried this:

workspace.CurrentCamera.CoordinateFrame = CFrame.new(Vector3.new(-1.244, 13.6, 41.715), Vector3.new(0, 70, 0))

That still rotated the camera. And instead of CFrame.new() I tried Vector3.new(). An error appeared saying CFrame Expected, got Vector3 (that wasn't 100% of what it said) so i changed it back to CFrame.

I know, whatever I'm trying to do might be idiotic..just help me out here xD

1 answer

Log in to vote
0
Answered by
Anubizx 76
6 years ago

Try set a Camera Type!

game.Workspace.CurrenctCamera.CameraType "Fixed" or "Attached"

If you dont want rotate the camera, i suggest Attached!

0
Well that's just how the player interacts with the camera using the arrow keys and/or right click.. Chez_Guy 67 — 6y
0
Actually it’s not chez, you can’t do much with the camera unless the type is scriptable cmgtotalyawesome 1418 — 6y
0
OOOOHHH..Thank you so much i forgot..stupid me Chez_Guy 67 — 6y
Ad

Answer this question