This is sort of two questions in one. So I have a problem with animation in my game, any script that makes an animation play will work when I am testing the game in Roblox Studio. The two things in my game that should be running animations is a seat (makes your sit position different) and an NPC with an animation. Like I said, both of these work when I test my game inside of Roblox Studio. But when I publish my game and actually play it from the website, the NPC is standing in his default position and the seat animations are returned to default. I know I am updating my game correctly because I inserted a part, updated it again, and played it. When I played the part was there. I do not know what is wrong with my scripts at all, what is going wrong in them? Thanks in advance!
(NOTE: I am using the Moon Animator Plugin, not sure if that makes any difference.)
I forgot to clarify , the NPC is the guy in the gaming chair behind the counter.
Code for the seat:
seat = script.Parent
if (child.className==“Weld”) then
human = child.part1.Parent:FindFirstChild(“Humanoid”)
if human ~= nil then
anim = human:LoadAnimation(seat.sitanim)
if anim ~= nil then
Code for the NPC:
local animation = script:WaitForChild(‘Animation’)
local humanoid = script.Parent:WaitForChild(‘Humanoid’)
local dance = humanoid:LoadAnimation(animation)