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.
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
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.
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.)