Custom walk animation not laoding

I’m trying to overwrite the original walk animation through the way it is shown except it doesn’t work.
The roblox animation is still being played.

local Players = game:GetService("Players")

local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")

	for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
		playingTracks:Stop(0)
		
	end

	local animateScript = character:WaitForChild("Animate")
	
	animateScript.run.RunAnim.AnimationId = "rbxassetid://6207601778"        
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://6207601778"      
	
	
	
end

local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)

Any help is appreciated.

Have you checked the output? If so, is there an error in the output, and, what is the error (if there was an error in the output). Also, do you OWN the animations? I don’t think you can use an animation if you don’t own it.

EDIT: I have ran the code, and the error I receive is: Screen Shot 2021-01-07 at 2.08.44 PM
For some weird reason, it is not PlayerName.Animate.walk.WalkAnim anymore, it is PlayerName.Animate.walk.RunAnim now.
Here is the correct code: (If the problem persists, then I don’t know what to do anymore).
local Players = game:GetService(“Players”)

local function onCharacterAdded(character)
local humanoid = character:WaitForChild(“Humanoid”)

for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
	playingTracks:Stop(0)

end

local animateScript = character:WaitForChild("Animate")

animateScript.run.RunAnim.AnimationId = "rbxassetid://6207601778"        
animateScript.walk.RunAnim.AnimationId = "rbxassetid://6207601778"      

end

local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded) [quote=“AwakenedElemental, post:2, topic:968972, full:true”]

It didn’t load for me, but that is probably because I don’t own it (the animation). Again, I don’t know what to do if the problem persists.

Sadly it didnt work and there was no error with the script i posted but when i tried yours it gave me the error you had except switched around
tests

Ok, I’m working on that. Check for edits in this reply soon.

STEP #1: Play the game
Screen Shot 2021-01-07 at 2.26.28 PM

STEP #2: In the explorer, open up workspace as shown (while still play-testing)

STEP #3: Open up your character’s model in workspace.

STEP #4: Open up the Animate script inside your character model

STEP #5: Open up the ‘walk’ string value, and see what is the name of the animation inside, for me, it was RunAnim, so I changed it to RunAnim in the script.
Screen Shot 2021-01-07 at 2.30.43 PM

That was pointless, but, you also should check if you had any errors before changing it to
animateScript.walk.RunAnim.AnimationId = "numbersHere

Also, this edit was just showing how to get to my conclusion with RunAnim. And, do everything until STEP #5 in play-test mode.

I looked in the Animate script and realised that the table the script gets the animation id’s from doesn’t change with the values in the string values and if i change the values in there and disable and re-enable the script my animations work, so now my problem goes on how to change those values.

Sorry, could you clarify? I couldn’t understand what you meant.

The animate script that gets loaded on ur character on spawn

test2 test3

it changes check the child of the values if it added if not then first of all try doing it in the client it worked well for me animations shouldn’t be handled on the server only client

Copying the Animate localscript and pasting the script into StarterCharacterScripts then changing the Id’s there fixed the problem.

2 Likes