Hello! I’m making a system where you can serve food!
I have four gui frames. These are orders.
They all have attributes set to them.
![]()
![]()
For example the first frame has carrots attribute, the second one has tomato attribute, the third one has tomato and fourth one has carrots.
Here’s the image representing what I mean.

I also have a plate that has this attribute.
![]()
![]()
And here’s my code!
local attributes = plate:GetAttribute("Foods") --getting the foods attribute from the plate
local frames = game.StarterGui.OrderGUI.MainFrame:GetChildren() -- getting all the gui frames
for _,frame in pairs(frames) do -- looping through the frames
if frame.Name == "OrderFrame" then
local orders = frame:GetAttribute("Foods") -- getting the foods attribute from the gui frames
if orders == attributes then -- if gui attribute is equal to plate attribute then it's gonna print working else it's wrong order
print("working")
else
print("wrong order")
end
end
end
I want to serve only one order and the problem is that if i have two gui frames with carrots (image above) then it’s gonna serve two of them.
The same thing occurs with tomatoes. If I have i plate with tomatoes attribute then it’s gonna serve two frames
Any help is appreciated! ![]()
