I have been working on my viewmodel system, I can always play the reload animation but never the shoot animation.
local module = {}
local Viewmodel = game.Workspace.Camera:WaitForChild("M16VM")
local animator = Viewmodel:FindFirstChild('Animator') or Instance.new('Animator')
animator.Parent = Viewmodel.Humanoid
wait(1)
function module.update(Viewmodel, dt)
Viewmodel.Camera.CFrame = game.Workspace.Camera.CFrame
end
function module.equip(Viewmodel, gun, hold)
local Eq = animator:LoadAnimation(Viewmodel:WaitForChild("Equip"))
Eq:Play()
end
function module.fire(Viewmodel)
local Fire = animator:LoadAnimation(Viewmodel:WaitForChild("Fire"))
Fire:Play()
Viewmodel.Muzzle.ShootSound:Play()
Viewmodel.Muzzle.MuzzleEffect.Transparency = NumberSequence.new(0)
wait(0.001)
Viewmodel.Muzzle.MuzzleEffect.Transparency = NumberSequence.new(1)
end
function module.Uncam(Viewmodel)
Viewmodel.Camera.CFrame = game.Workspace.UnCam.CFrame
end
return module
Error Code:
Help would be appreciated