Hey there,
I am currently creating a game and it has a shop system, so i made a table with the minimum and the max amount of said product the player can buy, but when the player goes to buy said product it tells me to input a proper answer.
The Script:
local amount = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} -- Table with the max and min amount of product the player can buy
script.Parent.MouseButton1Click:Connect(function()
for i, v in pairs(amount) do
if script.Parent.Parent.HowMany.Text == v then -- I assume there is something wrong here?
print("Purchasing...")
else
print("Please input a correct amount...") -- This prints 10 times
end
end
end)
Thanks!