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?
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.”
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?
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