How can I play an animation I made in the official Roblox editor?

attempt to index nil with play()

Ok maybe change play() to Play() instead

Also your variables should be defined at the start of the script

Moving the variables to the top some reason breaks the whole script.

Wait I’m dumb AHHAHAAH

The Animator object is supposed to be in the Character’s Humanoid

Change line 9 to

local Animator = Humanoid:WaitForChild("Animator")
1 Like

OOOOP we gettin somewhere, I just gotta figure out how to override the tool holding animation

Is there a way to make an animation be a priority over other animations?

Yep! You can set the Animation’s Priority to I believe to Action when you start to reference the Animation variable

Animation.AnimationPriority = Enum.AnimationPriority.Action

So I just slap that next to the variables? Let’s try it.

Actually, it’s easier than that — you can simply just go to the animation in the Animation Editor and set the Animation Priority in the animation settings.

1 Like

Thank you very much that helped me out

You were super duper helpful. I wanted to thank you for taking the time out of your day to help out a small dev. God bless you.

1 Like

I keep forgetting that exists whoops I’m so used to scripting that I forget about that

@CrazyGrapefruit32 Anytime! I mean that’s what the #help-and-feedback category is for after all! :sweat_smile:

1 Like

Havent felt this hyped in weeks I actually did something right with studio :grinning:
(with help of course)