-- Module
function module.PlayAnimation(modelToAnimate, animToPlay, looped)
print("called to play animation "..animToPlay.Name.." for the "..modelToAnimate.Name)
local anim =modelToAnimate.AnimationController:LoadAnimation(animToPlay)
anim.Looped = looped
anim:Play()
end
-- LocalScript
local gunToAnimate = GunAnimations:WaitForChild(weapon)
local AnnoyingThingThatJustMakesMeMad = GunModels:WaitForChild(weapon)
WeaponData.PlayAnimation(AnnoyingThingThatJustMakesMeMad, gunToAnimate.idle , true)
this is what i've tried
for context, weapon is a string, for example "pistol".
this is my first time posting here i have no idea
