Dancing gui script error

Hello! I got a script, for a gui, when you click on it, and the boombox music starts, the character starts dancing too. I got this error and I can not fix it.

add line that have local dancinganimation = nil in the first line of the script

1 Like

Means “DancingAnimations” is never declared add “local DancingAnimations” as the first line of the script.

Set up a variable near the top of the script with that name (DancingAnimation) and write it as nil

local DancingAnimation = nil

It’s not so much an error as it is a warning from Script Analysis, probably stating that DancingAnimation wasn’t previously defined within the code.

1 Like

Hi there! Is that good?

1 Like

You don’t need “= nil” and this is exactly what I suggested.