Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Roblox Default Animations Failing To Load... Please Help?

local animation = Instance.new("Animation")
animation.AnimationId = "180426354"
local animController = script.Parent.AnimationController
local animTrack = animController:LoadAnimation(animation)

local animation2 = Instance.new("Animation")
animation2.AnimationId = "180435571"
local animController2 = script.Parent.AnimationController2
local animTrack2 = animController2:LoadAnimation(animation2)

I seriously don't understand what the issue is. This used to work, but now it keeps saying that both the animations failed to load. These are the default walking and idle animations that Roblox uses, BTW.

1 answer

When loading content You need to follow the string format. Simply putting the id as a string into the animation id will not load the animation.

The common format used is rbxassetid://[asset id].

Example:-

local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://180426354"
local animController = script.Parent.AnimationController
local animTrack = animController:LoadAnimation(animation)

local animation2 = Instance.new("Animation")
animation2.AnimationId = "rbxassetid://180435571"
local animController2 = script.Parent.AnimationController2
local animTrack2 = animController2:LoadAnimation(animation2)

I hope this helps.

This discussion is preserved as it was. New answers, comments, and votes are closed.