"Hand-out" animation overwrites my weapon animation

I am having a problem with my idle animation where whenever I start walking with a tool or my animation starts again, the character’s default hand out animation plays and it overwrites the right hand of my character.

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
local RunServ = game:GetService("RunService")

character.Animate.idle.Animation1.Parent = game:GetService("ReplicatedStorage")
character.Animate.idle.Animation2.Parent = game:GetService("ReplicatedStorage")

local tool = script.Parent
local ClaymorerunAnim = Instance.new("Animation")
ClaymorerunAnim.AnimationId = "rbxassetid://16996158051"

tool.Equipped:Connect(function()
	local idleClaymore = Instance.new("Animation")
	idleClaymore.AnimationId = "rbxassetid://16988222288"

	if character:WaitForChild("Animate") then
		print("working")
		character.Animate.run.RunAnim.AnimationId = ClaymorerunAnim.AnimationId
		idleClaymore.Parent = character.Animate.idle
		local LoadedAnim = humanoid.Animator:LoadAnimation(idleClaymore)
		LoadedAnim:Play()
	local function PlayerMovement()
		if humanoid.MoveDirection.Magnitude > 0 then
			LoadedAnim:Stop()
			task.wait()
		end
	end	
	if humanoid.MoveDirection.Magnitude == 0 then
		LoadedAnim:Play()
	end
	RunServ.RenderStepped:Connect(PlayerMovement)
	end
	
 end)

tool.Unequipped:Connect(function()
	humanoid:EquipTool(tool)
	task.wait(0.2)
end)
2 Likes

When making animation there are different priorities (to edit press the 3 dots in animation editor then animation priority) I believe if you set it to be idle then it should work

1 Like

I think the proper thing to do here is get rid of the animators toolnone animation. You can do this by copying the Animate script from the player, putting it in StarterCharacterScripts, and setting the AnimationId of ToolNone inside the code to “rbxassetid://0” or nil.

I did this but unfortunately the hand animation still plays I also tried changing it during testing but it said it cannot be 0 and “nil” is insufficient

This post helped me resolve this:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.