Before you click off this post because you might not know how to solve this, a work around could also be fine!
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 . 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.
A work-around would be when the actual CharacterAdded event gets called. I believe
CharacterAppearanceLoaded an player with a personalized character joins
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)
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?