I have this script that plays an idle animation in an NPC (and there's an animation inside of it in Workspace) but the animations are all synced and it looks weird (ex. when the animation lifts a hand every NPC with that animation does so at the exact same time).

I tried to add a "wait(#)" with different numbers for each NPC before the "idle:Play()" but they are still synced up. Is there a way to add a wait to it at all, or would I have to make a new script?

local animation = script:WaitForChild('Animation')
local humanoid = script.Parent:WaitForChild('Humanoid')
local idle = humanoid:LoadAnimation(animation)
idle:Play()

8 comments

0

wait() should be after line 3

0

line 4, excuse me

0

I'll try that and give you feedback.

0

It didn't work, sorry

0

Well did you add a wait or just use wait()? Try wait(1), otherwise it’s its like a .03 second wait and likely not noticeable by your eyes

0

Yes, I typed different numbers for each NPC. I wonder if it has anything to do with me testing it in Studio.

0

I think it might be that the animations are loading after everything else loads, so (with my crappy computer) I would need to extend the waits to like 30 seconds or somehow make the script run after everything else has loaded in.

0

i bet your computer has like a 5400 rpm mechanical drive or something if it's doing that