Hello! I am making a Roblox game with a cashier system similar to Welcome to Bloxburg. I have created a line where NPCs wait until the cashier can take their order. How would I make it so when the NPC reaches the front of the line, a GUI pops up asking the cashier to select an item that they want? Any help is appreciated. Thank you!
There are a few ways to do this.
- Using the Magnitude between the two humanoids
- Using a proximity prompt
- Using an indexing system. All the NPCs are in 2 folders -
InQueue
orOutQueue
. They’ll be put into the former folder if they are in the queue and the latter if they are not. Then, using a table system, you can iterate or index through the table (InQueue:GetChildren()
) and get the first NPC inInQueue
. - Give IntValues to every NPC. If they are in the queue, set this IntVal to their position in the queue.
1 Like
Thank you so much, it worked!
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.