I created a first-person animation using Moon Animator. However, when I play the animation in Roblox, the player can still rotate freely, and only the arms move. I want the entire animation to play while locking the player’s movement and camera, effectively showing a cutscene. Does anyone know how to fix this?
heres footage explaining –
2 Likes
make camera type scriptable and attach cframe to player’s head
I also suggest anchoring humanoidrootpart temporally when animation players
1 Like
I tried attaching the camera to the players head and that didnt work but i can always try again! also im not seeing where to change the cameras type to scriptable? did they remove it cause i remember seeing it. thanks
Run this when the animation starts:
workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
And this when it ends:
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
Scriptable camera’s don’t move without well… scripting. To you have to reset it to “Custom” (which is the default) after its done so the player can control their camera again.
Also, here’s some code to also make the camera’s position update:
local cameraObject = game.Players.LocalPlayer.Character.Head --// Example
--// Start function
game:GetService("RunService"):BindToRenderStep("animationCamera", Enum.RenderPriority.Camera.Value, function())
workspace.CurrentCamera.CFrame = cameraObject.CFrame
end)
--// End function
game:GetService("RunService"):UnbindFromRenderStep("animationCamera")
May be typos in that since it was written in-browser.
1 Like
you should change camera .CameraType to ENum.CameraType.Scriptable
and only then setting its cframe
1 Like
im genuinely confused, i have tried multiple types of scripts and i cant seem to get anything to work.
1 Like