Hi, I am trying to make a simple betting system where the user inserts their bet into a textbox and then clicks the bet button. This generates a random integer which is supposed to multiply against the bet value and print to the output.
local bet = script.Parent.Parent.TextBox.Text
local GenNumber = Random.new()
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.TextLabel.Text = GenNumber:NextNumber(0,2)
end)
print(bet*GenNumber:NextNumber())
Here is also a screenshot of my UI layout
and here is the error that the output shows, 22:06:03.719 Players.Timsaay.PlayerGui.ScreenGui.Frame.TextButton.LocalScript:10: attempt to perform arithmetic (mul) on string and number - Client - LocalScript:10