I want the script to keep getting a new number every time the gui is pressed
No errors or anything but I dont understand why it wont get a new one and a new one and so on. Any help appriciated.
local RandomMathNumbers = math.random(1,1000)
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Text = RandomMathNumbers
wait(5)
script.Parent.Text = "Random number generator, idk either"
end)

1 comment
That's because the RandomMathNumbers is running one time because that part of the script runs once. Just put the local RandomMathNumbers inside of the script.Parent.MouseButton1Click function.