How can I stop Humanoid Animation while I am Tweening

Hello, when I try to play the animation while I am doing the tween it doesnt seem play I dont know why can somoene help me please?

By the way I am attacking Humanoid Animation

local AniamtionPlay = Humanoid:LoadAnimation(Attackonwall)
local goal = {}
goal.Position = Part.Position
local tweenPlayTweenService:Create(HumanoidRootPart,TweenInfo.new(0.1), goal)
HumanoidRootPart.Anchored = true
for _, playingTracks in pairs(Humanoid:GetPlayingAnimationTracks()) do
	playingTracks:Stop()
	AniamtionPlay:Play()
end
HumanoidRootPart.Anchored = true
tweenPlay:Play()
wait(5)
HumanoidRootPart.Anchored = false

From the code sample you’ve provided, the goal table is empty. No properties are being modified.

what are you talking about? I won’t send my script what I will put in my game. I don’t want hackers, I don’t want copy paste people.

Maybe because you’re looping the playing tracks, stopping and doing the animation multiple times, try making it like this maybe?

for _, playingTracks in pairs(Humanoid:GetPlayingAnimationTracks()) do
	playingTracks:Stop()
end
AniamtionPlay:Play()

And also check if the animation you’re trying to play, has the Animation Priority set to Action or Movement.

I dont know it doesnt seem work. When I disable Anchored then it does work

Ahh I know what was the problem. You just needed to play the animation, and stop it before the tween start

Looking better at it, it could be that you’re tweening the HumanoidRootPart Position, maybe if you change goal.Position = Part.Position to goal.CFrame= CFrame.new(Part.Position) it should work, atleast for me it makes sense.

Oh actually, I can change the CFrame because what you saw above is just an example. My real CFrame script is really big and I dont want share it. Therefore you dont need to be worry about anything.

Thanks for your help, I solved the problem.

Have a nice day! :smiley: