Animation not working on a character that does not have player

  1. What do you want to achieve?
  • I want my animation to work properly
  1. What is the issue? Include screenshots / videos if possible!
  • The script tells the animation on the character is already finished (by printing) but the animation haven’t actually showing
  1. What solutions have you tried so far?
  • I have tried to search from the dev forum but haven’t found the solution yet.

  • reminder: the character does not have a player. I inserted the character by using Load character plugin

local Sharkninja = game.Workspace:WaitForChild("sharkninja50") -- the character in the workspace

local AnimationIds = {
	13834104272, -- cam 1
	13815332221, -- cam 2
	13834110200, -- cam 3
	13834112397, -- cam 4
	13834115125, -- cam 5
	13834117187, -- cam 6
	13834119130, -- cam 7
	13834120658, -- cam 8
	13834122818, -- cam 9
	13834125193, -- cam 10
	13834126632, -- cam 11
	13834129427 -- cam 12
}

local Animation = Instance.new("Animation", Sharkninja)
Animation.AnimationId = "rbxassetid://"..tostring(AnimationIds[1])

task.wait(5)
local trackAnimation = Sharkninja:FindFirstChild("Humanoid").Animator:LoadAnimation(Animation)
trackAnimation.Priority = Enum.AnimationPriority.Action
trackAnimation:Play()
trackAnimation.Stopped:Connect(function()
	print("animation finished!")
end)
1 Like

Try replacing the animationid prefix with: http://www.roblox.com/asset/?id=

Still does not show the animation, but thanks!

Is your animation uploaded under your profile/the group’s profile?

it is uploaded under my profile.

Alright I think I solved the problem here, the animation does not show is just because I ANCHORED THE CHARACTER, NOT BECAUSE OF THE SCRIPT… I should have unanchored it.

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