I spawned Dummy and unAnchored ‘HumanoidRootPart’
but Dummy is not working, need help
what’s matter?
local humanoid = script.Parent
local newanimation = Instance.new("Animation")
local animationid = "http://www.roblox.com/asset/?id=507771955"
newanimation.AnimationId = animationid
local animation = humanoid:LoadAnimation(newanimation)
animation:Play()
I found the issue, It is because you’re not using an animator object
They are used to load animations onto a humanoid.
Here is the documentation:
This is what the code should look like:
local humanoid = script.Parent
local newanimation = Instance.new("Animation")
local animationid = "http://www.roblox.com/asset/?id=507771955"
newanimation.AnimationId = animationid
local animator = Instance.new("Animator") -- Creates an animator object
animator.Parent = humanoid -- Parents it to humanoid
local animation = animator:LoadAnimation(newanimation) -- loads animation onto animator
animation:Play() -- plays it
The reason your code wasn’t working is that this is an older way of doing it. I believe it was changed to give animations more security.