Hello, I recently made a 'Dances' GUI that allows the player to click to expand upon different dances, which they can click to dance.

It works fine in studio, but testing it in game reveals this error. https://imgur.com/a/9tT7Fme

It explains that the animations didn't load properly, even though I own them.

Any issues or fixes? Feel free to comment.

My code:

local player = game.Players.LocalPlayer
local character = player.Character
repeat wait()
    character = player.Character
until character
local hum = character:WaitForChild("Humanoid")
local emote = hum:LoadAnimation(script.Animation) -- The animation
playing = false
local textcolor = script.Parent
local equipped = Color3.new(0, 1, 0)
local unequipped = Color3.new(1,1,1)

script.Parent.MouseButton1Click:connect(function()
    if playing == false then
        emote:Play()
textcolor.TextColor3 = equipped
        playing = true
    elseif playing == true then
        emote:Stop()
textcolor.TextColor3 = unequipped
        playing = false
    end
end)

2 comments

0

I had this same problem idk if it will be yours though. If you don't own the game or if it is a group game the animation won't play the group or the friend needs to upload the animation to there profile or group then it should work.

0

Oh, thanks so much!