How to change classic animation

I want to change the classic roblox animations to my own, but I don’t understand how to do it.
I’ve already tried two options:

  1. I used the script from the official section:
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 animator:GetPlayingAnimationTracks() do
		playingTrack:Stop(0)
	end

	local animateScript = character:WaitForChild("Animate")
	--animateScript.run.RunAnim.AnimationId = "rbxassetid://"
	--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)

but unfortunately he did not want to work and gave an error.

  1. I copied the “Animate” script from the character and pasted it into StarterCharacterScripts, it worked in the roblox studio test, but did not work in Roblox.

Please tell me what to do to change the standard animations.

1 Like

the animate script not working in Roblox is weird tbh… but you could try to fetch the animation under the animate script and change them

local Players = game:GetService("Players")

-- Function to replace default animations with custom ones
local function onCharacterAdded(character)
	local humanoid = character:WaitForChild("Humanoid")
	local animateScript = character:WaitForChild("Animate") -- Fetch the Animate script

	-- Replace default animations with custom animations by changing the AnimationId
	-- Make sure to replace 'YOUR_ANIMATION_ID' with your actual animation IDs
	animateScript.run.RunAnim.AnimationId = "rbxassetid://YOUR_RUN_ANIMATION_ID"
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://YOUR_WALK_ANIMATION_ID"
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://YOUR_JUMP_ANIMATION_ID"
	animateScript.idle.Animation1.AnimationId = "rbxassetid://YOUR_IDLE_ANIMATION1_ID"
	animateScript.idle.Animation2.AnimationId = "rbxassetid://YOUR_IDLE_ANIMATION2_ID"
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://YOUR_FALL_ANIMATION_ID"
	animateScript.swim.Swim.AnimationId = "rbxassetid://YOUR_SWIM_ANIMATION_ID"
	animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://YOUR_SWIM_IDLE_ANIMATION_ID"
	animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://YOUR_CLIMB_ANIMATION_ID"
end

-- Function to handle when a player joins
local function onPlayerAdded(player)
	-- Connect to CharacterAdded to ensure animations are replaced when the character spawns
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

-- Connect the function to PlayerAdded to run the script when a player joins
Players.PlayerAdded:Connect(onPlayerAdded)

not too sure if this would work since I didn’t test it but keep me updated so that I can research on this if it doesn’t work

1 Like

It didn’t work, the animations were old and didn’t give out any errors.

1 Like

uhhhhhh that’s super weird, try heading in a thread with animators in the lots, they might have the solution

1 Like

Is the game your working on under a group? If so try to publish the animations you’re using under the group and not under a specific user if not done already. This will most likely fix the anims working in studio but not in the game itself.