I have a script that plays a punch animation whenever a RemoteEvent is Fired. The animation plays, but whenever I move my character, the animation is overwritten by the character's movement animations. Here's my code:

local Animations = game:GetService("ReplicatedStorage").Animations

game:GetService("ReplicatedStorage").MainEvent.OnServerEvent:Connect(function(plr,attack)
	local char = plr.Character
	if(attack=="Punch")then
		local anim = char.Humanoid:LoadAnimation(Animations.Punch)
		anim.Priority = Enum.AnimationPriority.Action
		anim:Play()
	end
end)

Does anyone know how I can prevent character animations from stopping my animation?

2 comments

1

I would suggest going back to the animation in whatever editor you used to make it (Default, Moon, Blender), and setting the priority to action directly from there.

0

Thanks, that fixed my issue! I didn't even know there was a priority setting in the editor!