Animation not playing

local dummy  = game.Workspace:WaitForChild("Dummy")
local humanoid = dummy:WaitForChild("Humanoid")

local animationcontroller = Instance.new("AnimationController",dummy)
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=892265784"
local animationtrack = animationcontroller:LoadAnimation(animation)
animationtrack:Play()

could it be because of the animation id? i took it from roblox.

1 Like

Try importing the animation directly, and then passing the animation object into :LoadAnimation. Do this in the command bar:

game:GetService("InsertService"):LoadAsset(892265784).Parent = game.ServerScriptService

A model should appear in ServerScriptService. There’s your animation.

I would check for the original animation controller first before making a new one, also it needs to be in the humanoid (not the dummy model).

none of those worked unfortunately, the thing still stays still

Could you show us your current script with the changes please?

local dummy  = game.Workspace:WaitForChild("Dummy")
local humanoid = dummy:WaitForChild("Humanoid")

local animationcontroller = Instance.new("AnimationController",humanoid)
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=7077455834"
local animationtrack = animationcontroller:LoadAnimation(animation)

wait(5)
print("e")
animationtrack:Play()

try animation controller = humanoid:WaitForChild(“AnimationController”)

1 Like
AnimationId is not a valid member of AnimationController "Workspace.Dummy.Humanoid.AnimationController"
1 Like

Dont keep the space in the variable, sorry

local animationcontroller = humanoid:WaitForChild(“AnimationController”)
1 Like

i took this from another article

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=7077455834" -- Roblox dance emote
 
local animationTrack = humanoid:LoadAnimation(animation)

and it worked