Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

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.

5 comments

0

Rewrited what you said iI had to do and put the camera to Scriptable but it didn't work D:

0

is it in a local script?

0

Yes

0

Oh i modified it a bit and it works now!

0

Great!

This discussion is preserved as it was. New answers, comments, and votes are closed.