I got an order script for the system but how do I check if there already is an order and if there is that the next button needs to be visible instead of the same? And if the first order gets clicked how do I make it that the TextButton which contains the other order that that one is going to the place that firstly had the original first one?
Hope this is explained well, ask if you need more information!
There isn’t really an core issue its just that I don’t really know how I can make it happen.
To go more in details:
There are 10 TextButtons which contains orders
If the first TextButton is visible and another order comes out of the order generator script then the TextButton next to the first TextButton needs to show up with that specific order and so on.
If the first order gets clicked and there are more orders visible they all need to go one place left so there won’t be any empty places in the Frame.
Hope you understand it more now, believe me for me it already is hard to understand.
To fix the 3rd issue you can use a UIListLayout which will do the job for you. To check if a player already has an order you could use a table with their name inside and then remove it when the order is completed.
• Adding orders and orders will stretched the orders ui to smallest y(0)
How to fix the stretching ui
You have to make the ui size to X: Scale and Y: Offset, for instance
UDim2.new(1, 0,0, 50)
Problems doing this:
Will create unexpected size for non-same device as you. Instead, to fix this: you have to script it where it detects what device they have and change the instance creator size offset to what you want
• If you won’t use AutomaticCanvasSize you’ll just have orders limit depending on order size and canva size
Can you show me how that works cause I’ve never heard of it. You don’t need to make a full script just something to explain so I can understand it.
You could have Values placed somewhere that contains the players order, you can change the order items by clicking the buttons obviously, and then after that you should be done, you can check what the order of the player is via the Values!
Example:
local Item1= "Hamburber"
local Item1Val = WhereEverYourValueIs
local ItemButton1 = script.Parent
Script.Parent.Activated:Connect(function()
Item1Val.Value = Item1
end)
Use table.insert() and table.remove() to add and remove the player’s username from the table. Take a look at this documentation for more information about tables.
I think you misunderstand what I meant.(not sure so don’t blame me if i’m wrong)
What I mean is that the order = an order like ordering a new computer. And the purpose of the game is that you need to sell stuff and thats why I need a randomized order system so the player’s can sell their stuff.
I really think that I missed something but hopefully you can explain it. Why do I need to use table.insert() and table.remove()? Is this so the TextButtons move places if another one gets clicked?
No, table.insert() and table.remove() would be used to check if the player already has an order being made. Please refer to the documentation as it provides codes examples and their explanation.
In the past, I have an ordering system for myself just for fun and this is how I manage to display the orders (since I think that’s what you are trying to do; if not, please tell me). Roblox Studio (gyazo.com)
As you can see in the GIF above, when the player clicks “Claim order” the order gets claimed and the frame deleted. You could achieve this by creating a template frame and cloning it each time a new order is made.