So i found two functions.

local p = game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule
local c = require(p):GetControls()
c:Disable()

And,

local p = game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule
local C = require(p):GetCameras()
C:Disable()

The first one GetControls() are working great, but the second one GetCameras() are not working. Those are all posted by Roblox staff in roblox devforum.

i got an error from studio: Workspace.MEndermanM.Main:6: attempt to call method 'Disable' (a nil value)

Update: i need to stop player to rotate their camera, but not using 'Scriptable'

Actually i'm making a first-person animation, it needs to track player's head to play it.

Any problem with my code? Or it just glitched?

Cheers.

9 comments

0

disable is a nil value, studio tells you

0

Yes, but those are release by roblox staff.

0

wdym, you cant disable something that you cant disabl

0

Why do you need to disable the camera in the first place?

0

Ok. I read the post ithat i said, he does not said it can be disable, only the Getcontrols() maybe...? Here's the post:

0

@hiimgoodpack Let me update them.

0

Can't you just force the camera to first person mode? https://developer.roblox.com/en-us/api-reference/property/Player/CameraMode

0

Please read. I said i'm making a first-person animation. my question is disable player to rotate their camera.