i am trying to make a hiding animation but the player can rotate around and break the animation.
the animation is a simple 2 second animation. I want the player to not turn around while the animation is being played.
How am i supposed to fix this ?
i am trying to make a hiding animation but the player can rotate around and break the animation.
the animation is a simple 2 second animation. I want the player to not turn around while the animation is being played.
How am i supposed to fix this ?
You can manipulate the player’s camera in a LocalScript to make this work. I also had the same problem, and this code worked for me:
local Camera = game.Workspace.CurrentCamera
local Humanoid = Player.Character.Humanoid
local HumanoidRootPart = Player.Character.HumanoidRootPart
Camera.CameraType = Enum.CameraType.Track
Humanoid.AutoRotate = false
HumanoidRootPart.Anchored = true
(This code is oversimplified, modify it to your needs)
script.camerathing:FireClient(player)
script.Parent.OnClientEvent:Connect(function()
local Camera = game.Workspace.CurrentCamera
local Humanoid = game.Players.LocalPlayer.Character.Humanoid
Camera.CameraType = Enum.CameraType.Track
Humanoid.AutoRotate = false
end)
i tried using that with remotes because my script was a server script, but it seems to not work
Try anchoring the Character’s HumanoidRootPart as well. I forgot to include that in my previous code, because I think that’s what disables the turning.
Many ways, I believe there is a property on the humanoid called .AutoRotate, but you could also use AlignOrientation to keep the player facing the direction you want, it works smoothly.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.