Hello everyone.
It may be easy, but I am new in scripting and I don't know how to script the GUI to hide one and show another when clicked a button.
After clicking a button you have few categories to choose from and then there should be option to buy the T-Shirt.
I have the guis done but I need the scripting... https://cdn.discordapp.com/attachments/623514573076692993/623525441038188573/Zrzut_ekranu_2019-09-17_o_16.27.12.png
The GUI will be for the shop where you can buy products via T-shirt payment. There should be place for decal photos and description.
Could you help, please?
Okay, so the real question is How to show a button when clicking one right? So you click A, A hides then B appears? Easy.
First of all, make sure that B is not Visible. B.Visible = false
(I'm using A and B, you have to do this with e.g gui.Frame.TextButton.Visible = false
for the second button)
Now, only A is visible.
A.MouseButton1Click:Connect(function(player) B.Visible = true A.Visible = false end)
Above you can see the code. As I mentioned, A should be e.g gui.Frame.TextButton or something, refer to that button.
Then this will hide A and show B.
Please note that you should use LocalScript or a normal script. Usually I would do a normal script and then use the player variable to refer to the player, but I think (I'm not sure, please don't judge me for this) you can use a LocalScript and do game.Players.LocalPlayer. But I prefer a normal script.
So this is how you do this.
I'm assuming that the other parts are already done. Also you can use the script but replace A with B and B with A to do the opposite.