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

How do I make it so my camera can't move?

Asked by 8 years ago

When a player, joins, this localscript is put into their backpack

cam = game.Workspace.CurrentCamera

cam.CameraSubject = game.Workspace.Focus
cam.CameraType = "Attach"

This works, but how would I make it so you can't move the camera up, down, left, right and you cant zoom in or out? Attach is the closest to that. Thanks for all help :)

0
Make the cameraType Scriptable theCJarmy7 1293 — 8y
0
Well, I figured, but I am not that into scripting cameras, so I don't know how I would script how I want it thehybrid576 294 — 8y
0
I would say make it Fixed unless you want to script some behavior later, http://wiki.roblox.com/index.php?title=API:Enum/CameraType User#11440 120 — 8y

2 answers

Log in to vote
0
Answered by
crut24 50
8 years ago
local cam = game.Workspace.CurrentCamera

cam.CameraType = "Scriptable"
cam.CFrame = CFrame.new(pos1,pos2)
 -- Pos1 is the position of the camera (Where do you want it to be)
 -- Pos2 is the position of where the camera is looking at
Ad
Log in to vote
0
Answered by 8 years ago

Try this. =]

local cam = game.Workspace.CurrentCamera

cam.CameraSubject = game.Workspace.Focus
cam.CameraType = "Attach"
wait(.1)
cam.CameraType = "Scriptable"
cam.FieldOfView = 70
1
What? Why did you use a wait to change the cameraType more than once? Just set it to Scriptable before the wait. Using unnecessary waits are ugly.   User#11440 120 — 8y

Answer this question