So I made a function which would print a random number between 1-100 when a button is pressed (in this case the 'button' is a Part)
button = script.Parent
buttonVal = script.Parent.Value
Instance.new("ClickDetector", button)
button.ClickDetector.MouseClick:connect(function(clicked)
buttonVal.Value = math.random(1,100)
print(buttonVal.Value)
end)
But I was wondering if there was a way to make sure the same number is NEVER printed twice. So this means eventually after pressing the button some-odd-number of times nothing would be printed because every number between 1-100 has already been printed previously. Thanks in advance.
-CalmShip
|