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?
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.
This is the script I used:
if plr then
repeat wait() until plr.Character
plr.Character.Animate.run.RunAnim.AnimationId = 657564596
I am just replacing the id.
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
Might be worth using the rbxassetid ContentId format.