Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can you update ammo and clip in a gun gui?

Asked by 9 years ago

I have number value objects under the main local script in the gun and I have successfully applied those values to the gui but how can I update them efficiently? A while loop won't work since I can't run the other code in the script. Should I use coroutine? Any answer is appreciated!

if clipleft.Value > 0 then
            fire()
            clipleft.Value = clipleft.Value - 1 -- how can I make this change in the gui as well?
        elseif clipleft == 0 then
            emptyclip = true
        else
            outofclips = true
        end
0
You answered your own question - use a coroutine(: Goulstem 8144 — 9y
0
ok thanks! dragonkeeper467 453 — 9y
0
wow, who gave me the negative reputation. What was that for? dragonkeeper467 453 — 9y

Answer this question