So I have this reload script:
function reload(mouse) reloading=true sp.Handle.Reload:Play() mouse.Icon=ReloadCursor while sp.Ammo.Value<ClipSize and reloading and enabled do wait(ReloadTime/ClipSize) if reloading then sp.Ammo.Value=sp.Ammo.Value+1 check() else break end end check() mouse.Icon=Cursors[1] reloading=false end function onKeyDown(key,mouse) key=key:lower() if key=="r" and not reloading then reload(mouse) end end
I have this but it only makes it make the sound not reload:
sp.Ammo.Changed:connect(function() if sp.Ammo.Value == 0 or sp.Ammo.Value < 0 then mouse = game.Players.LocalPlayer:GetMouse() reload(mouse) end end)
This is basically the script that makes you reload and also the script that adds the ammo when you reload. This script is great and all but I am trying to make it reload automatically instead of having you click R because its annoying to do and also some people don't know how. If you can help me with this please let me know what I have to do? THANKS! -TixyScripter-
At the end of the script, maybe add:
sp.Ammo.Changed:connect(function() if sp.Ammo.Value == 0 or sp.Ammo.Value < 0 then --mouse = game.Players.LocalPlayer:GetMouse() reload(mouse) end end)
?? Don't know, never manipulated guns.