My animation has been uploaded by my account and is in my library. I tried in a local script but also on the server but same error. I set the priority of the track to action.
Here is the local script it is in StarterPlayerScripts:
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
local Animation = Instance.new("Animation")
Animation.Name = "TestAnimation"
Animation.AnimationId = "rbxassetid://117281120933394"
-- Stop any currently playing animations
for _, track in pairs(animator:GetPlayingAnimationTracks()) do
track:Stop()
end
print("Loading animation...")
local AnimationTrack = animator:LoadAnimation(Animation)
if AnimationTrack then
print("Animation loaded successfully.")
AnimationTrack.Priority = Enum.AnimationPriority.Action
AnimationTrack:Play()
print("Animation is playing: ", AnimationTrack.IsPlaying)
else
warn("Failed to load animation.")
end
print(animator:GetPlayingAnimationTracks())
And this is the output but the character isn’t playing it.
