I’m creating a function that will play animations from just their id, here’s the code I have so far.
(Yes I know I’m using the deprecated humanoid:LoadAnimation()
function, but doing it through the animator seemed like extra work)
local function Animate(id, callback)
local animation = Instance.new("Animation")
animation.AnimationId = baseURL:format(id)
local track = humanoid:LoadAnimation(animation)
track.AnimationPriority = Enum.AnimationPriority.Action
track:Play()
track.Stopped:Connect(function()
coroutine.wrap(callback)()
animation:Destroy()
end)
end
Here’s the error im getting:
17:07:29.678 AnimationPriority is not a valid member of AnimationTrack "Animation"