I have an idle animation for a gun, and while it works, it overrides the walking animation. I tried setting the priority to something else, but it didn’t work. Script if it helps:
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local animator = Instance.new("Animator")
animator.Parent = character.Humanoid
local gunMotor = Instance.new("Motor6D")
gunMotor.Part0 = character.UpperTorso
gunMotor.Name = "Main"
gunMotor.Parent = character.UpperTorso
end)
end)
remoteevents.EquipGun.OnServerEvent:Connect(function(player, gun)
if not player.Character then return end
if not player.gunFolders:FindFirstChild(gun.Name) then return end
local gunSettings = require(gun.settings)
local character = player.Character
local animator = character.Humanoid.Animator
local gun = gun:Clone()
local gunMotor = character.UpperTorso:FindFirstChild("Main")
gunMotor.Part1 = gun.Main
gun.Parent = character
local animation = animator:LoadAnimation(gunSettings.animations.server.idle)
animation.Priority = Enum.AnimationPriority.Movement
animation:Play()
end)