of     1   

MujahidArno
#183393183Thursday, February 11, 2016 10:00 PM GMT

It freezes after reloading! Player = game.Players.LocalPlayer Mouse = Player:GetMouse() CanFire = false TriggerClicked = false ReloadDown = false local maxAmmo = 30 local curAmmo = maxAmmo local FireSound = script.Uzi Mouse.Button1Down:connect(function() TriggerClicked = true print'TriggerClicked on' end) Mouse.Button1Up:connect(function() TriggerClicked = false print'TriggerClicked off' end) Mouse.KeyDown:connect(function(Key) if Key == "r" then ReloadDown = true end end) while wait() do while TriggerClicked == true do if curAmmo >= 0 then if CanFire == false then wait() CanFire = true curAmmo = curAmmo - 1 FireSound:Play() print(curAmmo.."/"..maxAmmo) wait(.1) CanFire = false end else wait(.1) print'No Ammo' end end while ReloadDown == true do wait() CanFire = false ReloadDown = false print'Reloading!' wait(2) print'Reloaded!' curAmmo = maxAmmo print(curAmmo.."/"..maxAmmo) CanFire = true wait() end end
Aovis
#183395997Thursday, February 11, 2016 10:46 PM GMT

Is it a localscript
JarodOfOrbiter
#183396924Thursday, February 11, 2016 11:00 PM GMT

You aren't waiting in the loop.
ranvlr2o50
#183397103Thursday, February 11, 2016 11:03 PM GMT

add while thruse do at the star of the script and it will work

    of     1