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

how do i create a gui counter, that counts how many items that i clicked on an item and have a max?

Asked by 6 years ago

how do i create a gui counter, that counts how many items that i clicked on an item and have a max. here is the code:

this = script.Parent isClickable = true

--Variable myMax = 5

function addCount(plr) if isClickable == true then local oreCount = plr.StarterGui.ItemCounter.Box.one if oreCount then if oreCount.Count.Value >= myMax then print("You Have Too Many") return else oreCount.Count.Value = oreCount.Count.Value+1 end else local itemCount = oreCount.Count.Value oreCount.Name = "Crystal Count: "..itemCount local count = Instance.new("IntValue", oreCount) count.Name = "Count" count.Value = 0 end end end

0
So you want it to only let you click it 5 times? R2D2yodayolo 32 — 6y
0
yeah, befor it wont let you click it anymore tank915 0 — 6y

Answer this question