Hello everyone, I’m currently having a minor issue. When playing a looped run animation from a local script, it plays and weirdly and doesn’t seem to be working right. However when I use the (almost) exact same code on a server script, it works just fine.
Server script inside NPC model:
local Mob = script.parent
local Humanoid = Mob.Humanoid
local RunAnimObject = Mob.Animations.RunAnimation
local RunAnimTrack = Mob.Humanoid.Animator:LoadAnimation(RunAnimObject)
task.wait(2)
RunAnimTrack:Play()
Local script inside StarterPlayerScripts:
local Mob = game.Workspace:WaitForChild("SoldierAlly")
local animations = Mob.Animations
local RunAnimObject = Mob.Animations.RunAnimation
local RunAnimTrack = Mob.Humanoid.Animator:LoadAnimation(RunAnimObject)
RunAnimTrack:Play()
Theres nearly no difference in code, but the animations play completely different.
Animation playing when played from a server script:
Versus animation playing when played from a local script (Inside starterplayerscripts):
Another thing I’ve noticed is that the animation played from the local script plays wrong for a while as you can see, but after about 30-40 seconds it starts playing correctly. I’ve no idea why this is happening
I’ve already made sure that the server script isn’t active when the local one is, so there’s no script interaction causing this behaviour.
Any idea what might be causing this? Thanks!