I want to just make a script that will play an idle animation for my NPCs and I came up with one but once a player joins the server they can only see the animations if they are the first person to enter the server and IDK why. If anybody has a script for player NPCs that would be great because the wiki doesn't make sense I've tried using it multiple times.
wait (10)
local humanoid = script.Parent:WaitForChild("Humanoid")
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/asset/?id=449814596"
local Idle = nil
while not Idle do
Idle = humanoid:LoadAnimation(anim)
wait()
end
wait()
Idle:Play()

2 comments
Where is the script and is it a Local Script or a regular Script?
In the NPC and I tried to do both but right now it's regular