- What do you want to achieve?
- I want my animation to work properly
- 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
- 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)