How can I disable the camera from following the player while on a skateboard platform?
If you don’t want it to follow the player at all, you could set their camera’s CameraType to Scriptable.
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable --//Camera will no longer move at all, and will be locked in its current position
Yes but I still want the player to be able to move their camera around but right now it kinda auto pans like this -
robloxapp-20210422-0854570.wmv (1.4 MB)
Is it possible to prevent the camera from following the player like that when they are on a SkateboardPlatform?
You could set the CameraSubject
property to something other than the player’s humanoid. That’ll make it so you can still move the camera, but it won’t follow the player.
When you want to re-enable that functionality, set the CameraSubject
back to the player’s humanoid.
I would i put this into a script (I’m kinda a noob at scripting)
local camera = workspace.CurrentCamera
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
local TARGET_PART = workspace.FocusPart --//Some part goes here
local function disableFollow()
camera.CameraSubject = TARGET_PART
end
local function enableFollow()
camera.CameraSubject = humanoid
end
This could be a LocalScript inside of StarterPlayerScripts.
Thanks very much!!