Dance Gui not working

I am trying to make an emote GUI system, but the script doesn’t seem to work!
Whenever I click on the emote, it doesn’t play but it just doesn’t let you move, it only works in studio, what its supposed to do is to freeze you in place and do the emote until you click on it again.

I think my script might be outdated

I have tried to look for solutions but I cannot find any, and I have tried looking through my script, but I actually have no clue what is wrong since I don’t script often.

Script and stuffs

image


image

Please help!

Check the errors in the output regarding that script, and get back to me with any information

Alright it seems theres no errors regarding the script up there hm…

Try some print statements inside of the mousebutton1click function

Try this out?

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local emote = animator:LoadAnimation(script.Parent.Emote)

local playing = false

script.Parent.MouseButton1Click:Connect(function()
	if not playing then
		emote:Play()
		hum.WalkSpeed = 0
		hum.JumpPower = 0
	else
		emote:Stop()
		hum.WalkSpeed = 16
		hum.JumpPower = 50
	end
	playing = not playing
end)

I modernized your code to make it simpler + using Animator instead of Humanoid to load the animation, it should work hopefully

1 Like

I forgot to tell you that it only works in studio, so that means there could be an error in the script.

That did not work either, it does work in studio, but not in the actual game.
And yes I am publishing the game and then going into the actual game ( not studio) to make sure it actually works.

Maybe try publishing the game to just a test place and see what happens, maybe you have some sort of virus on your game im not sure

What kind of things should I search for in my scripts for virus’?

Well Im guessing you didnt make the script by yourself for check your game for things you took out of toolbox

I only took a donation board from the toolbox, everything else is made by me, and I reused the animations gui from a scrapped game I was making ( I made the gui and scripts from tutorials.)

Hahahaaaaaaaaaaaaaaa is this a virus?
image

Hmmmmm, honeslty that looks really suspicious

Try to remove it and see what happens

Its a script in the donations board :face_with_monocle:
The gui in the board doesnt work when I take it out but it does look

1 Like

Yeah remove that thing now 30cararcters

Well, I don’t know because I can’t see the module script.

How do I view the module script? Sorry I am quite new to scripting.

There really isnt any reason that the script shouldnt be working in the real game

Maybe try publishing the game to a test place

It’s a module script I’m pretty sure to make the board work without a mass amount of scripts and there isn’t an issue with this…

Yeah usually backdoors use modulescripts