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

Make camera unrotateable by the player?

Hi. i wondered if there's a way to make the camera can't be rotated by the player, but to still can move or be rotated by the system by itself. I mean, for example, set the camera to "Watch", but so that the player can't rotate the camera with the mouse or keyboard (Or gamepad, whatever). Yeah, I know I can use "Scriptable" but I want the camera to be on "Watch" type, not "Scriptable". I looked for it on Google, but i couldn't find info about it. I would appreciate any help!

Thanks.

2 comments

0

I mean I guess you could try settings the CameraType to "Scriptable" and use a RenderStepped function to Interpolate the camera to a custom position behind the character and keep the focus on them.

0

Ok, I'll guess I can search for it on the wiki.

1 answer

Not sure if this is correct, will check tomorrow - wrote this on my smartphone device.

local player = game.Players.LocalPlayer
local camera = player.Camera

camera.CameraType = Enum.CameraType.Watch

3 comments

0

Um thanks, but I wasn't searching for that. I know how to change the camera type, but what I'm looking for is that the player can't rotate the camera with the mouse.

0

Um thanks, but I wasn't searching for that. I know how to change the camera type, but what I'm looking for is that the player can't rotate the camera with the mouse.

0

Ah, okay. I think I got you, hold on.

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