Help with making a gui for my matching outfits game

I’m a pretty new developer and need some help with making a GUI where i can click on a certain clothing item or accessory and it will allow the player to buy it, for example I would click on the rig and a GUI would show up with a square containing each accessory


This is an example of what I would like my GUI to look like, I would also like it to have a “Buy” and “Wear” button, and the squares to all have the same spaced gaps depending on the accessory amount, I am able to make guis but need help with the scripting part of it please! :slight_smile:

1 Like

You can make a dictionary with each clothing/accessory ID then Use the MarketPlaceService to prompt the clothing purchase

1 Like

would you be able to explain a little more please, not sure how i would do this thats all

1 Like

A dictionary is basically a table, you can change the index and value

local Clothing = {
["Cute1"] = "rbxassetid://12345678";
["Cute2"] = "rbxassetid://12345678";
}

so you can add the name and the clothing inside it, then make a small system to get the content and place it on the GUI
then use a remoteevent to pass the info to the server with the clothing that the user wants wear/buy

RemoteEvent.OnServerEvent:Connect(Function(Player,AssetID)
MarketPlaceService:PromptPurchase(Player,AssetID)
end)

How would i put this onto a GUI tho in the squares? I want an image of the pieces of clothing or accessory in the boxes and then u click the box and get asked to buy it, sorry if im not very clear!

You can search on how to use ViewportFrames, they are used to add 3D models into the GUIs

I mean like from the original post, I want to know how i can make my 2d gui have a clickable square with the image of clothing or accessory that the original rig in front of me is wearing and then i want to make it so that i can wear or buy the selected clothing.