Script for custom R15 animation doesn't work

In my game, I want all players to use a custom R15 animation pack. To make this work, I’ve used a script on the DevHub.
However, it doesn’t work when joining the game.
In the console, it gives me this error:

This is my script:

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://782842708"        -- Run
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://782843345"      -- Walk
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://782847020"      -- Jump
	animateScript.idle.Animation1.AnimationId = "rbxassetid://782841498"    -- Idle (Variation 1)
	animateScript.idle.Animation2.AnimationId = "rbxassetid://782845736"    -- Idle (Variation 2)
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://782846423"      -- Fall
	animateScript.swim.Swim.AnimationId = "rbxassetid://782844582"          -- Swim (Active)
	animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://782845186"  -- Swim (Idle)
	animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://782843869"    -- Climb
end

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

Players.PlayerAdded:Connect(onPlayerAdded)

How should I make it work? I’m sorry if I am asking stupid questions. I am not that experienced with the Lua code language.

The string value inside of the animate doesn’t have a valid member of it’s child called “JumpAnim”, look if it’s inside or rename if it has a incorrect spelling, if you already did that…

Then you must set a wait function, you don’t really have to make a full script to change the animate script’s animation, you just press play then copy the original animate script that automatically places itself in the player’s character model.

After that, you can paste it in starter character scripts, change the id of the string values inside it and the script, that should make it work.

1 Like