What's wrong with my button?

No other script is involved, only local script

1 Like


And here are the properties of the Gui button

1 Like

The arrow that i drew from the image label was going to the some emerald image, but if you looked at the parent of the image label, it will be the image button, and this is what i am using

1 Like

Ok guys, I think this is somehow confusing, here what I did.

I wanted to make a shop gui which has main page, and other pages. When a button in the main page is pressed, the other page appear. To be clear in the programming style, I wrote that when a button in the main page is clicked, I set the other page.Visible = true. Will this affect the button?

1 Like

Can you try uploading the screen gui to here, I can’t really see what the problem is

1 Like

The script should be working try putting this code in your studio might have crashed:
script.Parent.MouseButton1Click:Connect(function()

print(“Purchased”)

end)

1 Like

Why is there an image button with a image label? Shouldn’t the image button contain an image for better use?

2 Likes

I’m very confused now, so confused I can’t do my assignments (not a joke). The dev hub shows this as if the image button is working, I tested myself at saw that it is working as well, Can you try to test it with the other buttons or change the script to setting the image button to a random color?

2 Likes

I just put and image label to put a small mini image inside the button

1 Like

I can see now, set the Z-Index to a higher value like 2 just like what @TestyLike3 said.

2 Likes

It maybe that I made visible = false, and then when I clicked another button to make it visible = true it crashs

1 Like

Oh by the way, is the image button visible or not?

2 Likes

But at least thank you guys for trying to help me, I will try to remake the gui and see if it works or no

1 Like

It is visible but true frame is not visible

2 Likes

Yeah that was what I was thinking, plus recreate it in an empty baseplate if recreating it in your own place doesn’t work.
Edit: Visible-false frames are not active.

2 Likes

And when I click another button, it makes the frame visible

2 Likes

Wait can you screen shot your entire screen you have? If there is no output (just like what I said) there is no result.

2 Likes

The image button is the one selected, its parent is a scrolling frame, and the button contains a localscriprt with a tiny image and a text

1 Like

Sorry if you think I’m bullying here, but can you screen shot me the output or you don’t have it on?

2 Likes

No don’t worry

here are the stages that I used, I first enter to the shop and this gui appears to me

then after I click the sword button another gui appears to me

now if I clicked the scripted button (Which is the sword) nothing appears

1 Like