I’m curious if anyone has solved this or is this intended behavior for bullet weapons.
Upon completing a reload cycle, the first attempt to fire the weapon does not work (Just an empty mouse click). After that initial mouse click, the weapon fires normally. I have verified that this occurs on a fresh install of the weapon system so it has nothing to do with any of my customizations. Anyone else using the system notice this?
Additional note: This only happens on auto reload when a clip is empty. Pressing the reload button “R” while extra rounds are still in the clip does not expose the issue.
I believe I found a solution. Posting here in case anyone else wants to fix the issue.
Basically, it was a blocking condition in BulletWeapon script.
Look for the function below, and reposition the “-- Reenable trigger after activated changes to false” as I did below
Hope this helps someone because it was making me lose my mind!
function BulletWeapon:onActivatedChanged()
BaseWeapon.onActivatedChanged(self)
if not IsServer then
-- Reenable trigger after activated changes to false
if not self.activated and self.triggerDisconnected and not self.burstFiring then
self.triggerDisconnected = false
end
-- Reload if no ammo left in clip
if self.equipped and self:getAmmoInWeapon() <= 0 then
self:reload()
return
end
if self.activated and self.player == localPlayer and self:canFire() and tick() > self.nextFireTime then
self:doLocalFire()
end
end
end
Wow, this a really interesting fix. It’s pretty good to see different developers upgrading the Roblox’s endorsed weapon kit still to these days. I’m thinking of making a post where we can retake all the changes we’ve done to the Weapon System so far. Good work with this one!