I've solved this know, this answer is no longer in use.
LOCAL SCRIPT:
local tool = script.Parent local config = tool:WaitForChild("Config") local remotes = tool:WaitForChild("Remotes") local actionservice = game:GetService("ContextActionService") local equipped = false local reloading = false local lastShot = tick() --Animations --Sounds --Remotes local canreload = remotes:WaitForChild("CanReload") local canshoot = remotes:WaitForChild("CanShoot") local fire = remotes:WaitForChild("Fire") local hit = remotes:WaitForChild("Hit") local reload = remotes:WaitForChild("Reload") --Config local range = config:WaitForChild("Range") local reloadtime = config:WaitForChild("ReloadTime") local ammo = config:WaitForChild("Ammo") local spareammo = config:WaitForChild("SpareAmmo") local Damage = config:WaitForChild("Damage") local headshot = config:WaitForChild("Headshot") local magsize = config:WaitForChild("MagSize") local firerate = config:WaitForChild("FireRate") tool.Equipped:Connect(function() equipped = true end) tool.Unequipped:Connect(function() equipped = false reloading = false end) local function canshootf() print("Invoked!") if math.abs(lastShot - tick()) > (60/firerate.Value) then print("Gun fire has not went past the fire rate value") if equipped then print("Equipped is true") if not reloading then print("Reloading is false") if ammo.Value > 0 then print("Ammo is greater than 1") return true else tool.Sounds.EmptySound:Play() end end end else print("Gun cannot shot") return false end end canshoot.OnServerInvoke = canshootf
oh well my local script part is gone for some reason
My best guess is that on your "OnServerInvoke" function for the "canshoot" in the non-localscript side is that it will always return false therefore your localscript won't continue on the "MouseButton1Down" thing.
But other than that you might get better results if you put some "print" functions around to see if anything runs (such as putting it after an if statement) or to see values. Also showing us anything in the console with errors is something that will help us get to the end of your issue.
If you have any questions or issues contact me. :)