Weird animation behaviour

Hi guys, my animation works however when I move my character the roblox walking animation plays aswell and they both combine to make a weird animation. How do I fix this?

Here is the weird behaviour in action.
Testing area - Roblox Studio - Gyazo

local frame=script.Parent
local user=game.Players.LocalPlayer
repeat wait() until user.Character local char = user.Character
local humanoid = char:WaitForChild("Humanoid")
local anim
function playanim(id)
	if char~=nil and humanoid~=nil then
		local id="rbxassetid://"..tostring(id)
		local oldanim=char:FindFirstChild("LocalAnimation")
		if anim~=nil then
		if oldanim~=nil then
			if oldanim.AnimationId==id then
local b1=frame.Dance1
b1.MouseButton1Down:connect(function() playanim(b1.AnimID.Value) end)
local b2=frame.Dance2
b2.MouseButton1Down:connect(function() playanim(b2.AnimID.Value) end)
local b3=frame.Dance3
b3.MouseButton1Down:connect(function() playanim(b3.AnimID.Value) end)
local b4=frame.Dance4
b4.MouseButton1Down:connect(function() playanim(b4.AnimID.Value) end)
local b5=frame.Dance5
b5.MouseButton1Down:connect(function() playanim(b5.AnimID.Value) end)
local b6=frame.Dance6
b6.MouseButton1Down:connect(function() playanim(b6.AnimID.Value) end)

Here is the animation script

  1. Set all animation priority to action
  2. Add new keyframes to the parts that are affected by this, you don’t have to animate them, just add new keyframes for them.
1 Like

Like @amadeupworld2 said, you want to change the animation priority.

You can do this two ways:

  1. When exporting the animation, make sure AnimationPriority is set to action before exporting
  2. If the animation track has already been exported, you can change it via script with AnimationTrack.Priority = Enum.AnimationPriority.Action (make sure to do this before loading the animation on the humanoid)
1 Like

Do I do that for each time a bodypart has been animated?

Then press add all, the keyframe only needs to be added once

Oh, so when I finished making the animation I just press that?

No, you add the keyframes at the beginning of the animation

1 Like

I did this and it’s still doing it. Hold on ima try see if I know the reason. Nvm it didn’t work

This is what I did

Nvm, it was a problem with the way I made the animation.