How do you check if a sound is already playing?
This is what I have so far. If the players Ammo is 0 then I check to see if the DryFire sound is playing and if not then play it.
if self.ammo == 0 then
if self.DryFireSoundFile:GetState()~= Source.Playing then
self.DryFireSoundFile:Play()
else
self.FireSoundFile:Play()
self.ammo=self.ammo-1
self.FireRateTimer = 0
end
When I run this it stops at GetState call with a nil value.