:LoadAnimation not working

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like to be able to animate the dummy.

  2. What is the issue? Include screenshots / videos if possible!
    It gives me the following error Unable to cast value to Object

local Clone = game.ReplicatedStorage.Client:Clone()
local Humanoid = Clone:WaitForChild("Humanoid")
local Run = Humanoid:LoadAnimation("rbxassetid://2510202577") --error on this line
local Idle = Humanoid:LoadAnimation("rbxassetid://2510197257")
local Sit = Humanoid:LoadAnimation("rbxassetid://10839368838")
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Tried looking around but found no solution

You can’t put an ID inside :LoadAnimation(). Rather, you should put an Animation Instance instead.

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=2510202577" -- Your Animation ID

local animationTrack = humanoid:LoadAnimation(animation)

Make an animation instance for each animation track. Hope this helps, let me know if it’s not solved yet.

3 Likes

@R_obotz thank you a lot it works now!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.