so im trying to make this plugin for my friend that loops through animations within a folder and then loads them into a rig's humanoid and then plays them, but this doesn't seem to work and i literally have no idea why
--//animation plugin for alimr local toolbar = plugin:CreateToolbar("AirLive1") local createAnimationFolder = toolbar:CreateButton("create animation folder","creates an animation folder","") local previewAnimation = toolbar:CreateButton("preview animation","previews the animation","") local function createAnimFolder() local animFolder = Instance.new("Folder",workspace) animFolder.Name = "Animation Folder" for i = 1,3,1 do local animString = Instance.new("Animation",animFolder) animString.Name = "Animation "..i end end local function previewAnimationFunc() local selection = game.Selection:Get() if selection[1].Name == "Animation Folder" and selection[2].Name == "Rig" then print("Yes v2") local rig = selection[2] local humanoid = rig:FindFirstChild("Humanoid") for i,a in pairs(selection[1]:GetChildren()) do print(a.Name) local track = humanoid:LoadAnimation(a) track:Play() end end end createAnimationFolder.Click:Connect(function() createAnimFolder() end) previewAnimation.Click:Connect(function() previewAnimationFunc() end)