I uploaded my mesh plus animation as an .fbx file.
I am able to load my animation and play my animation with the Animation Editor, please see the screenshot below:
I don’t use animations very often but this should work:
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://(upload your animation and put the asset ID here)"
local animator = Instance.new("Animator")
local animationTrack = animator:LoadAnimation(animation)
-- Start playing the animation
animationTrack:Play()
-- Play the animation again every time it finishes
animationTrack.Ended:Connect(function()
animationTrack:Play()
end)
It should work if you put the code in a server script inside your model. Honestly I’ve never used the new Animator instance (I always just use the Humanoid API), so you’ll need to double check if that works properly. The code should work regardless of what you’ve set the animation’s looped property to in the animation editor.
I saved again over the existing animation with the “Loop” activated.
But the issue is still the same. The Character Animation doesn’t even begin to play, when in “Play Mode”.
Sorry for the late reply, I missed the notification.
I don’t know why I made this so unclear, but the animator needs to be the one your character uses, not just some random one I created for some reason.
Here’s some code but with the path to your Animator from the explorer picture.
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://(upload your animation and put the asset ID here)"
-- This should be the correct path to your Animator
local animator = script.Parent.Parent.AnimationController.Animator
local animationTrack = animator:LoadAnimation(animation)
-- Start playing the animation
animationTrack:Play()
-- Play the animation again every time it finishes
animationTrack.Ended:Connect(function()
animationTrack:Play()
end)
However, for some reason… there is still the issue, that the character doesn’t move “freely” in space. It looks like the root bone is stuck at a location, or can’t move.
I am running out of any ideas how to get this done.
You can download the .rbxl file with the script right here: my_animation_test.rbxl (1.1 MB)