local char = script.Parent --the npc
local hum = char:WaitForChild("Humanoid") --the npc's humanoid
local animation1 = hum:LoadAnimation(script.Animation1) --finds the animation inside the script and loads it in the npc's humanoid
local animation2 = hum:LoadAnimation(script.Animation2)
if char and animation1 and animation2 then --this just checks if the npc exists
while true do
animation2:Play() --plays the animation
wait(4.5)
animation2:Stop() --stops the animation
animation1:Play()
wait(8)
animation1:Stop()
animation2:Play()
wait(4.5)
animation2:Stop()
animation1:Play()
wait(8)
animation1:Stop()
end
end
So, I'm trying to make this NPC's only purpose is to be an Idle player for my Custom Character GUI. In Studio, the script above works just fine, however, in online mode/server the figure just stands there with no animate being at all. All recommendatons/suggestions are welcome! Thank you, for your time.
Respectfully,
- sparkevin

2 comments
Local scripts in NPCs don't work in a online server. If this script is a local script and is inside the NPCs character model, convert it to a server script and it should run fine in a online server.
@sickings It's not a Local script.