-- LocalScript - In an tool.Activated event
local curstage = 0
local maxStage = 2
local Switch_AnimId = {
[0] = function() return "rbxassetid://XXXXXXXX" end,
[1] = function() return "rbxassetid://YYYYYYYY" end,
[2] = function() return "rbxassetid://ZZZZZZZZ" end,
}
local animation = Instance.new("Animation")
animation.AnimationID = Switch_AnimId[curstage]()
local track = humanoid:LoadAnimation(animation)
curStage += 1
-- ...
The question is:
Switching AssetIDs makes the client to download the animations everytime that it occurs? Or somehow the server download and saves the animation an unique time?
Sorry for the previous Comment, I meant, It should cache on the first usage of the animation then use that cached keyframe. So bascially you just have to load it once. You can also use PreloadAsync. These are just hypothesis.