This code seems to work fine in Studio, but it’s not doing anything in live games:
local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:Play()
Is there something wrong with the way that’s handling it? I looked up a few existing threads but didn’t see much that helps here. The Animation priority is set to Action, so that shouldn’t be the problem.
Also, the script is running server-side in an NPC character, if that has to do with it at all.