[solved] Animation not playing with some avatars?

Hello! My friend got one of his assets he was wearing deleted and my animation isn’t playing for this avatar. More info below!
I am working on a word bomb inspired game and I cant seem to fix this issue:
in the video you can see on the right side the first player being animated

The first player has perfect animation but the others don’t? Players are added to the ring by cloning a rig and setting the humanoid appearance to the player’s. The following code is responsible for loading the animations.

function getAnimation(roomObj, name, playerNum)
    -- gets the valid animation for the player
	if playerNum == nil then
		local animation = roomObj.Settings.Animations:FindFirstChild(name)
		return animation
	end
	local animation = roomObj.Settings.Animations:FindFirstChild(name)
	if roomObj.Settings.Animations:FindFirstChild("ShouldUsePlayerSpecific") then
		if roomObj.Settings.Animations:FindFirstChild("ShouldUsePlayerSpecific").Value then
			animation = roomObj.Settings.Animations:FindFirstChild(`Player{playerNum}__{name}`)
		end
	end
	return animation
end
-- Character setup
local character = script.Dependancies.PlayerRig:Clone()
character.Name = player.UserId
character.Player.Value = player
character.Parent = activeRooms[room].Room
if player.UserId > 0 then
	character.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(player.UserId))
end
	
character:SetPrimaryPartCFrame(activeRooms[room].Room:FindFirstChild(roomUtilThing.PlayerCharacterSpawn).CFrame)
character.PlayerRig.Enabled = true
	
-- Do animations
local animation = getAnimation(activeRooms[room].Room, "Enter")
local enterTrack = character.Humanoid.Animator:LoadAnimation(animation)
enterTrack.Looped = false
enterTrack:Play()
enterTrack.Ended:Once(function()
	character.FollowCamera.Value = true
end)

the explorer view if needed
image

Thanks for your help!

I found out that after some more testing that my avatar is the only one that works. This alt account and my friend’s avatar both dont work. I tried changing my avatar to an R6 to see if it would change anything [anims and avatars are forced to R15] and nothing broke. I’m so confused :confused:

When it comes to animations, the problem is always from the developer side

8 out 10 is the code or its logic

these are some issues I go through frequently:

  1. The animations are not under a group
  2. Maybe you confused account animation ids with group animation ids
  3. When exporting the animation, it might have been corrupted because of the Rig
  4. The rig type (R6, R15) isn’t the one the animation was animated for
  5. You’re still using Humanoid to play animations over the Animator
  6. Animation Priority is too low and isn’t able to play on top of higher priority
  7. You tried to play the animation before the character was rendered in workspace
  8. The animation id is empty
  9. The Motors of the rig are broken
  10. Some humanoid state like platform standing
  11. The Animate script is duplicated or gone
  12. The script responsible to play the animation only execute once and not always on respawn (you need to update the humanoid, animator variables and the animation tracks when the character dies)
  13. The exported track had no keyframes

it’s quite bad that Roblox don’t pin common issues somewhere :confused:

Oh yeah, sounds like replication issue. Did you set NetworkOwnership to the player? cloning characters tend to break replication somehow

  1. I published them as the roblox group page if thats what you mean
  2. as I will say a bunch of other times it worked on my avatar
  3. it worked on my avatar so I doubt it is corrupted
  4. R15 is set to be animated and used for everyone
  5. I’m using the Animator
  6. I set the Sit animation to Idle and nothing other is playing - it works on my avatar :person_shrugging:
  7. I could use :WaitForChild but I doubt this is i
  8. Nope, loading is right :3
  9. I need to double check this
  10. ?
  11. haven’t checked, will update late
  12. character is a cloned rig with the player display, I’m pretty sure it can’t die
  13. nope…

Let me check… charactersssssssssssss

didn’t fix it… thanks for the suggestion though [the model is anchored]

Maybe this is the issue?

did it used to work before?

no it’s been here for a few days I think

did you anchor the root part or the entire model?

entire model, but it did work up until some point

You could try it.

When do you set the character to the player? you should try playing the animation after you assign the character to the player if you are not doing that already

I unanchored everything and only the root part and it fixed it??? idk but yippe!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.