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

How do i make a camera be positioned and can't move?

Asked by 6 years ago

Hello all! I try to make sure that the camera is where I want it and that players can not move the camera with the cursor! So for example I want the camera to look at a random NPC for a few seconds and then I want the camera to move to a different position so that it sees a new NPC and I do not want random players to move the camera from an animation you make like ObliviousHD but in a game! Thank you if you can help me or if you have a theory about how it works!

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

So the first thing that you should do is change the camera to scriptable. Then you should set the camera's CFrame to wherever you want (this is inside a local script) :

local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = CFrame.new(0,0,0)

don't copy and paste. My capital letters are off. Just rewrite it. Hope this helps!

Ok now if you got your camera to not move, change the CFrame.new to your NPC's position. You can also make a list of CFrames that you could tween to, each of them being a Position of the NPC's.

0
Rewrited what you said iI had to do and put the camera to Scriptable but it didn't work D: DaSonicRules 13 — 6y
0
is it in a local script? greenhamster1 180 — 6y
0
Yes DaSonicRules 13 — 6y
0
Oh i modified it a bit and it works now! DaSonicRules 13 — 6y
0
Great! greenhamster1 180 — 6y
Ad

Answer this question