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)
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
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:
The animations are not under a group
Maybe you confused account animation ids with group animation ids
When exporting the animation, it might have been corrupted because of the Rig
The rig type (R6, R15) isn’t the one the animation was animated for
You’re still using Humanoid to play animations over the Animator
Animation Priority is too low and isn’t able to play on top of higher priority
You tried to play the animation before the character was rendered in workspace
The animation id is empty
The Motors of the rig are broken
Some humanoid state like platform standing
The Animate script is duplicated or gone
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)
The exported track had no keyframes
it’s quite bad that Roblox don’t pin common issues somewhere
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