Problem with animating a tool

So I want my tool to play an animation, although it gives me an error, That error just drive me insanse, because it makes no sense!
Error:
Portal is not a valid member of Tool “Players.octav20071.Backpack.PortalGun”

Exporer:
Captură
Portal Instance is an AnimationController

Script:
local shootAnim = script.Parent.Portal:LoadAnimation(script.Shoot)

local holdAnim = script.Parent.Portal:LoadAnimation(script.Hold)

local activateAnim = script.Parent.Portal:LoadAnimation(script.Activate)

local holdSound = workspace.World.Sounds.HoldSound

script.Parent.Activated:Connect(function()

workspace.World.Sounds.FireSound:Play()

shootAnim:Play()

end)

Why do you not use the Humanoid in this case? Also, you can always try “WaitForChild” for objects that you are certain are there, but are not.

1 Like

I heard that Humanoids lags the game even more

Plus none of what you said worked

The recommended method for making the players, actually anything that has a humanoid, animate is by using the humanoid; however, that is irrelevant to the issue here. Tell me what you got from using WaitForChild.

I didn’t got the error anymore, but the animation doesn’t play;
maybe I cannot use Animations on tools?
(I think I have to re-rig the gun in order to connect the animation with the player’s character, I don’t know)

You could try using Motor6D’s to weld the Tool to the Character that way in order to play your animation?

I fixed it, somehow, but thanks!