Basically, when I anchor a player to stop them moving, if they were moving before I anchored them, they will still be doing the walking animation, or if they were falling, they will still be doing the falling animation. How would I stop this so that when I anchor the player they are just stood normally. (The game is in r6 if that makes any difference)
Thanks for any help 
for _, anim in ipairs(Humanoid.animator:GetPlayingAnimationTracks()) do
anim:Stop()
end
marked this solution if this helps!
1 Like
Didnt do anything for me unfortunately
try this
after anchoring the HRP
for _, anim in ipairs(script.Parent.Humanoid.Animator:GetPlayingAnimationTracks()) do --this will stop all the animation even the idle so we need to play the idle animation
anim:Stop()
end
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://507766666" ---this is the idle animation
local Hum = script.Parent.Humanoid --get the humanoid
local animTrack = Hum:LoadAnimation(Animation)
animTrack:Play()
1 Like
characterHumanoid:ChangeState(Enum.HumanoidStateType.PlatformStand)
--and when you unanchor them you do
characterHumanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
hope that will fix your issue
If platformstand doesnt work, use the physics state
1 Like
I got this error message:
‘PlatformStand is not a valid member of “Enum.HumanoidStateType”’
please check the auto completing code. yes, i made a mistake, its called PlatformStanding
Try this:
for i, v in character:GetChildren() do
if v:IsA("BasePart") or v:IsA("MeshPart") then
v.Anchored = true
end
end