Im very new to animating objects that are not players, I’ve made a simple gun system but when I try to play the animation it doesn’t play:
Gun Animation Clip
Gun Animation Not Playing Video
Here is the layout of everything:
And Here is my Code:
local ViewModel: Model = Camera:WaitForChild("ViewModel")
local VM_Gun: Model = ViewModel:WaitForChild("Gun")
local VMGunAnimator: Animator = VM_Gun:WaitForChild("Humanoid"):WaitForChild("Animator")
local VMGunDBAnim = GunAnimationFolder:WaitForChild("GunShot Debounce")
local function GunDamage(Bullet)
local VMGunTrack = VMGunAnimator:LoadAnimation(VMGunDBAnim)
VMGunTrack:Play()
end
I think the solution to this problem would be calling the “GunDamage” function in the script. To do this, you just need to add “GunDamage()” and put the parameter “Bullet” inside the parenthesis.