Hey! I made a walk/run animation for my custom character model, but whenever I try to use the Roblox’s Documentation script to change the animation IDs within the character, it doesn’t work. Whenever I check my character’s animation IDs (in game) under the script called “Animate” (the script that makes the animtions work), its just the default animations. Here is the link to the documentation: Using Animations | Roblox Creator Documentation.
If you cannot access the documentation right now, here is the default script that it gives you:
local Players = game:GetService("Players")
local function onCharacterAdded(character)
-- Get animator on humanoid
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
-- Stop all animation tracks
for _, playingTrack in pairs(animator:GetPlayingAnimationTracks()) do
playingTrack:Stop(0)
end
local animateScript = character:WaitForChild("Animate")
animateScript.run.RunAnim.AnimationId = "rbxassetid://656118852"
--animateScript.walk.WalkAnim.AnimationId = "rbxassetid://"
--animateScript.jump.JumpAnim.AnimationId = "rbxassetid://"
--animateScript.idle.Animation1.AnimationId = "rbxassetid://"
--animateScript.idle.Animation2.AnimationId = "rbxassetid://"
--animateScript.fall.FallAnim.AnimationId = "rbxassetid://"
--animateScript.swim.Swim.AnimationId = "rbxassetid://"
--animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://"
--animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://"
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
The script just stops and doesn’t run the onCharacterAdded function at from what I can tell. There are no errors too. I don’t know why this is happenening, and I probably can’t mend it. I tried to do my best, but I can’t seem to fix it. Thanks!
Hi,
Since you are using a custom character you have to do some other things.
First you need to get a copy the Animate script from a working player, while it is in Play mode in studio.
For fun I made a copy of your Avatar, and put it in StarterPlayer, named exactly as StarterCharacter, so now I have a custom character. (You can also just Run the game, and in Play mode, copy your character, then stop, then paste it into the Workspace)
then do a CTRL Shift V, and paste it into the Workspace, then delete all the stuff under the Animate script (this stuff will get rebuilt when the game runs later)
The walk animation ID is reset when I load into the experience.
Your method doesn’t work because Roblox force resets the animation script and all of the contents within it.
When I talk about the walk animation ID, I mean the stuff that you deleted that was inside of the Animate script. If you go over to WalkAnim and the value within it, you would see the ID needed. I know this is whats wrong because I manually put the ID in game to that value and the animaiton played.
I don’t understand what you mean. I have a custom rigged custom character that is renamed to StarterCharacter that is placed in StarterPack. It uses parts and is not in the shape of a normal player.