CharacterAppearanceLoaded() doesn't work for Custom Characters

Before you click off this post because you might not know how to solve this, a work around could also be fine! :slight_smile:

Hey! I made a custom character for the player to spawn into as, but when I want to play the animations I gave it using Roblox’s Documentation script (Using Animations | Roblox Creator Documentation) to change the default character animations, it doesn’t work. I then figured out that CharacterAppearanceLoaded() was the peice of code that was stopping the function from running. Here is the script:

local Players = game:GetService("Players")

local function onCharacterAdded(character)
	wait(1)
	-- Get animator on humanoid
	local humanoid = character:WaitForChild("Humanoid")
	local animator = humanoid:WaitForChild("Animator")

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

I made the first run animation “1” just to see if it would apply to the spawned character, which it didn’t :roll_eyes:. I’m not sure if this is a problem based on the character. I want to know if there is a workaround or if there is just an answer to my problem. Also if you are wondering, this script works perfectly on normal characters.

Is this a server script or local script?

It’s in server script service as a server script. Check out the documentation I linked if you have questions about the script.

A work-around would be when the actual CharacterAdded event gets called. I believe
CharacterAppearanceLoaded an player with a personalized character joins

1 Like

how and where would i put CharacterAdded?

local function onCharacterAdded(character)
	wait(1)
	-- Get animator on humanoid
	local humanoid = character:WaitForChild("Humanoid")
	local animator = humanoid:WaitForChild("Animator")

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

Players.PlayerAdded:Connect(onPlayerAdded)

Here. I made edits to this line

player.CharacterAppearanceLoaded:Connect(onCharacterAdded)

I simply changed the event that would be called when a player character joins. If this doesnt work. Resort to use PlayerAdded only

1 Like

Thanks, it applies to the ID of the character now, but would you know why the animation wouldn’t be playing? Because it isnt…

"rbxassetid://1"

isnt an actual running animation? Or did you change that.

I changed it. I also made sure that the ID was valid and it was the animation I needed.

In errors in console? You may not have the right path.

I do have the right path, no errors in console.
When I open the animation editor an open the walk animation the grid moves instead of the torso for some reason?

Ok forget what i said about the grid thing i fixed that but now the character isnt moving when I want to test it. (humanoid root part is anchored)

I am dumb. If its a StarterCharacter you can throw an animate script inside the StarterCharacterScripts and it should work

nope

qwertyuiop
asdfghjkl
zxcvbnm

You mind sending over the world model?

ill send the character and the script

i DMed you it
asdfasdfasdfasdfasd

The issue is your StarterCharacter. Look up how to make Custom Characters. There isnt anything wrong with your script.

I have. I have for days. I’m trying to get help here.