I want to use the animations that Roblox has created and sold on the catalog/avatar shop. I want to set them as the animation style for all players that join my game. I also want to use animations from different packages.
I don’t know how to get the IDs for the animations and I don’t know how to put them into the character because they don’t load when I try. If you are willing to help, can you guide me on how to script these animations into every player that joins the game and have it as their animation even after they die and respawn?
Example:
I want to use the knight animation for the running animation.
Grab the run animation’s catalog ID from that package and load it into your game.
Here’s a command line to do that: game:GetService("InsertService"):LoadAsset("[CATALOG ID HERE]").Parent = workspace
It will load a Model with an animation nested inside. Save the .AnimationID or the whole animation.
Now, you should be able to follow one of the many solutions on dev forums about how to replace the default animations using the Animate local script.
How would I get the id for an individual animation (such as the running animation) from a package because, when I use the id ‘68’ for the knight animation package, it shows an error?
Check its “Included Items” list. Then you’d get the individual animations: Knight Run - Roblox
Now use that command line with the catalog ID ‘734325948’ to get the Knight Run
I got the animation into the character but the ‘animate’ script under the character is having a hard time with it. It shows up with a bunch of errors and the animation eventually breaks. Do you know how to avoid this?
When you edit the Animate script, are you making sure to leave the names of everything parented to Animate the way they were? If it’s nil it sounds like it’s lost a reference somewhere. Ideally you only change the numbers in the .AnimationID to the new ones in both the heirarchy of the script and within with its table of animations.
game.Players.PlayerAdded:Connect(function(plr)
if plr then
repeat wait() until plr.Character
plr.Character.Animate.run.RunAnim.AnimationId = 657564596
end
end)
As weird as it sounds, manually setting the ID of something using assetservice within a script doesn’t prepend it with the URL it should, like it does when you set it in Studio’s explorer. Try instead: plr.Character.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=" .. 657564596
Hi, it’s been a long time since anyone last talked on here, but I’m having a similar but slightly different dilemma. Instead of having the catalog animation play for the player, I want it to play for an NPC. Does anyone know how one would do this?
You do not need to own it but the id from the store link may be different than the animation link. I use the extension BTRoblox and it gives you the object that has the animation attached and you can copy the link from there. You don’t want the product id but the animation id.