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

How to make the player's camera, is fixed, and you can't rotate it, but the mouse can still move?

Asked by
A_Mp5 222 Moderation Voter
3 years ago

How would I make it so, the player's camera, is fixed, and you can't rotate it, but the mouse can still move and click? I have no current scripts, and i don't NEED one I just need explanatory.

2 answers

Log in to vote
1
Answered by
N43FGXL 169
3 years ago

There are multiple ways to do this.

One way: You can set the CFrame-position of the camera.

local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CFrame.new(CameraPosition, CameraLookPosition) -- the camera will be at the first position and look at the second

Another way: You can change the CameraType of the camera.

local camera = workspace.CurrentCamera
camera.CameraType = "Fixed"

There are also multiple articles on this topic on the Roblox Developer Hub.

0
It's giving me the the type of camera I want (Free mouse, fixed cam), but the position is odd A_Mp5 222 — 3y
0
Maybe use parts to help position your camera. N43FGXL 169 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

Just set the Camera's CFrame to a fixed position. It would be something like this:

local Camera = workspace.Camera
Camera.CFrame = CFrame.new(--[[Where you want the Camera, Direction it's looking in.]]--) 

Answer this question