Even though its scripted to play, the animation doesnt play

ok so, basically i made a gun

these basically

image

and i made some reload animation and fire animation stuff. and when i went to test it, none of the animations played,

here is the fire animation script:

local tool = script.Parent

local anim = Instance.new("Animation")

anim.AnimationId = "rbxassetid://6047692419"

local track

tool.Activated:Connect(function()

track = script.Parent.Parent.humanoid:LoadAnimation(anim)

track.Priority = Enum.AnimationPriority.Action

track.Looped = false

track:Play()

end)

tool.Unequipped:Connect(function()

if track then

track:Stop()

end

end)

here is the reloading part in the main gun script:

	local input = game:GetService("UserInputService")
	input.InputBegan:Connect(function(Key)
		if Key.KeyCode == Enum.KeyCode.R and Reloading == false and Ammo ~= MaxAmmo then
			Read:Play() -- read = script.Animation
			reload()

so yeah, i need help

Write the “h” in humanoid with a capital h.
(Humanoid)

1 Like

that didnt fix it, sadly it still doesnt play

EDIT: NVM, IT FIXED THE FIRE ANIMATION THINGY, I JUST CHANGED THE WRONG SCRIPT, THANKS

1 Like