So, I created an NPC named Dawn, and used a viewportframe to render it to GUIs. Dawn is and R15 model, and is child of the viewportframe. I set a script under "Dawn" and written the following:
local animation = script.Parent.Humanoid:LoadAnimation(script.Parent.Female_Run) animation:Play()
The output doesn't show any error. the Female_Run
is an Animation and its ID is 507767714. It doesn't play the animation and doesn't show any error in the output. Please help I need to know about the problem. Thanks in advance!!
The main problem is that you never instance a new animation.
In order for it to work, you must create a new animation instance via 'Instance.new'.
local animation = Instance.new("Animation") --Creates an animation animation.AnimationId = "rbxassetid://507767714" --Gives the animation an asset ID, I used yours local control = script.Parent.Humanoid --An animation requires a control, which can be a humanoid or an AnimationController control:LoadAnimation(animation):Play() --This loads the animation in "LoadAnimation"s parameter and plays it