Animation Load Module

I am trying to make a secure animation loading module for my gun framework where, if i add a new animation, it will automatically load without me needing to do this every time:

local Animation = AnimationFolder:FindFirstChild("Animation Name")
Humanoi:LoadAnimation(Animation)

How would i do this?

A for-pairs loop should help

for _, animation in pairs(animationFolder:GetChildren()) do
    humanoid:LoadAnimation(animation)
end

Thanks, idk why i didn’t think of that other than the fact it is like 4am

2 Likes