Hey, pretty much the title.
I’ve got a skinned mesh animation, and been trying to figure out how to play the animation, there’s no humanoid in the object, as I’d normally play animations via Humanoid.
Thanks in advanced!
Hey, pretty much the title.
I’ve got a skinned mesh animation, and been trying to figure out how to play the animation, there’s no humanoid in the object, as I’d normally play animations via Humanoid.
Thanks in advanced!
Is this what you are looking for?
This is a replacement for a Humanoid when it is not needed to play an Animation.
If you have any questions feel free to ask!
Hey, I believe I’ve set it up right but it isn’t working?
Just doesn’t play, and there’s no errors either
Here’s the code I added to the server:
local InsertService = game:GetService("InsertService")
-- Load a model for demonstration
local npcModel = workspace.FBXImportGeneric
-- Replace the humanoid with an animationcontroller
local animationController = Instance.new("AnimationController")
animationController.Parent = npcModel
-- Create and load an animation
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=9664702848" -- Roblox dance emote
local animationTrack = animationController:LoadAnimation(animation)
-- Play the animation
animationTrack.Looped = true
animationTrack.Changed:Connect(function()
print("smth changed.")
end)
animationTrack:Play()
The animation is this: