Default Animations always core even if replaced

Currently I am trying to make a set of animations play (idle and walking) appear when I hold a certain tool out. I can handle the idle animation fine by just playing it when the tool is equipped and stopping it when unequipping it.

However, when I try to replace the default roblox animations with my custom animations, the priority of these animations are automatically set to core even if the priority of my animation is at movement (so it overrides the idle)

Right now I am thinking of duplicating the default animation script created on player spawn, placing it into StarterScripts and just editing out the line that changes priority but I am not 100% sure if this is the most efficient way of handling the problem

Here is the code bellow for my animations in the tool

-- more variables here just in case something is missing bellow
local tool = script.Parent
local idleAnim = script.Parent.Idle
local idle

tool.Equipped:Connect(function(_)
    Gcharacter = tool.Parent
    idle = Gcharacter:WaitForChild("Humanoid"):LoadAnimation(idleAnim)
    idle:Play()
    Gcharacter.Animate.walk.WalkAnim.AnimationId = "rbxassetid://13219624454"
    Gcharacter.Animate.run.RunAnim.AnimationId = "rbxassetid://13219624454"
end)
... -- more code here
tool.Unequipped:Connect(function()
    idle:Stop()
    Gcharacter.Animate.walk.WalkAnim.AnimationId = "rbxassetid://180426354" -- Default roblox anim id
    Gcharacter.Animate.run.RunAnim.AnimationId = "rbxassetid://180426354" -- Default roblox anim id
end)

If anyone has a solution for this problem or any advice it would be greatly appreciated : )

Thanks

1 Like