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.