Animation not working?

i know this is the wrong category, i just need help quickly

Hello! basically i got this script here (works perfectly fine)

local gun = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
gun.Equipped:Connect(function()
	if char then
		local hum = char:FindFirstChild("Humanoid")
		if hum then
			local anim = Instance.new("Animation")
			anim.Name = "IdleAnim"
			anim.AnimationId = "rbxassetid://18798754053"
			local track
			track = hum:FindFirstChild("Animator"):LoadAnimation(anim)
			track.Looped = true
			track.Priority = Enum.AnimationPriority.Action4
			track:Play()
		end
	end
end)

but for whatever reason, heres how the animation looks:

robloxapp-20240805-1951591.wmv (801.8 KB)

please help!

How to stop arms from moving while animation is playing? - Help and Feedback / Art Design Support - Developer Forum | Roblox

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