Dance GUI not working?

I’m trying to create a dance GUI in my up-and-coming vibe game. The player would click a button, opening a GUI where they could select a dance and it would start an animation.

When I tested the final product in game, clicking the button did nothing. I’ve triple checked the script/GUI names and all the details-and from my knowledge everything is correct. Does anybody with any scripting experience or anyone who has dealt with dance GUI’s before have a clue to what the issue is?

Are there any errors on the Output at all?

After testing, none, which leads me to thinking this doesn’t have to do with the script. If so, i’m thoroughly confused on what is going wrong here.

I’d just check for debugging with print statements, if you don’t think that anything’s wrong then something’s stopping the script from progressing any further but since there’s no errors, even just adding a couple of prints would work fine to help investigate where the issue may lie

The script is parented inside the Frame’s GUI, correct?

Correct. I’ve heard that when exporting the desired animation to the roblox library (to get the AnimID) that you need to export it within a group, not as me (the player). I haven’t been able to test this out though because when I export it to a group, the item is “not for sale.”

That may be the potential case

If I recall, you won’t be able to play animations unless if they’re owned by the Group Owner themselves (But I have a vague memory on that so it’s only a guess) you could maybe ask the Group Owner to export the Animations that way?

A lot of the code you’re using is deprecated, I believe there’s a much better way to do this. I think you should rewrite the code completely.

I am the group owner :sweat_smile:

It could definitely be something to do with animation ownership itself, I will give some stuff a try for now.

Got it. I actually am not the most experienced scripter and had help from a tutorial for this script. Ill give it a try!

Just check when the button is clicked and if it is then use Animator:LoadAnimation() on the animator.

1 Like

Even though it is deprecated, it should still work fine regardless

But I do agree on fixing some stuff to keep in mind:

  • Humanoid:LoadAnimation is deprecated by the more modern Animator that’s actually inside the Humanoid object, so you’d do Humanoid.Animator:LoadAnimation instead

  • repeat wait() isn’t the best approach to check for a Player’s Character, we have Player.CharacterAdded:Wait() as a better alternate, as this would yield if there’s no Character Model found instantly

  • Do consider changing your functions to local functions

@MrHappyFluffyCow I see, well it could be possible that you have the AnimationPriority set to Core? Maybe if you haven’t done so, set it to Action and re-export it again if that changes anything

1 Like

Got it to work with your and @rc8s help!!

Many thanks-

1 Like