I need help please. Why does it say Play is not a valid member of animation
local plr = game.Players.LocalPlayer repeat wait()until plr.Character local humanoid = plr.Character:WaitForChild("Humanoid") local tool = script.Parent local NilAnim = script.Nil local FiringWeaponAnim = script.FiringWeapon local EquippedWeaponAnim = script.EquippedWeapon script.Parent.Equipped:Connect(function() humanoid:LoadAnimation(EquippedWeaponAnim) EquippedWeaponAnim:Play() script.Parent.Unequipped:Connect(function() print("Unequipped") end) end)
You need to save the variable of the loaded animation track like so
script.Parent.Equipped:Connect(function() local anim = humanoid:LoadAnimation(EquippedWeaponAnim) anim:Play() script.Parent.Unequipped:Connect(function() print("Unequipped") end) end)