Issue: Image Button not detecing clicks at all, the 2 buttons are exactly similar expect for the position.
Code
KnifeDamageDecrease.MouseButton1Click:Connect(function()
print("clicked33") -- doesn't print
local Req2 = SendReq2:InvokeServer()
if Req2 then
print("true33")
else
print("false33")
end
end)
I’ve tried remaking the button but with no success.
1 Like
What type of script is this? Regular Script or Local script? Any errors?
2 Likes
Nope, no error’s. It is a local script by the way. As you can tell by the
AtScripterBoy:
InvokeServer()
What’s the hierachy of your Gui that contains the image buttons? I think something is wrong there?
Here’s a picture of them.
There is image labels but I made buttons above them to have a wider range to be clicked.
1 Like
The labels are most likely covering the button.
But why would it not cover one and cover the other one? Also, the buttons are above the image labels, and the buttons are bigger and have a wider range/size.
2 Likes
You may be having that issue because of the Z index, as I replied to someone about this yesterday.
I think there is no error in the script but I have an idea.
script.Parent.CylinderOutline.ImageTransparency = 0.5
This line may have prevented the button because of Z index. Before you click the button, Z index is invalid but after you change the transparency of the image, the button must have gone under the image. If this image and button is overlapping, maybe z index is causing it.
Try changing the Z index of the image buttons. Block's z index must be higher than others.
1 Like
But why would one work and the other not? They’re EXACT copies just different positions and images.
So make their Z index lower when they are clicked and the other one, higher.
Not_1yo
(Not_1yo)
April 12, 2021, 5:56pm
11
Did you path it correctly maybe?
Yes I did. (limit ahahhaahahah)
Not_1yo
(Not_1yo)
April 12, 2021, 5:57pm
13
Actually what I would do is make another textbutton and make it invisible and put it on top
1 Like
Not_1yo
(Not_1yo)
April 12, 2021, 5:57pm
14
Sounds unprofessional but its decent
That’s what I did so there is a wider range.
1 Like
Not_1yo
(Not_1yo)
April 12, 2021, 5:58pm
16
Did you do image button or text lol. In the title you said image?
1 Like
Not_1yo
(Not_1yo)
April 12, 2021, 5:58pm
17
Could be a difference idk. Im on mobile so i cant script well
Well it’s a image button not a normal button.
1 Like
Not_1yo
(Not_1yo)
April 12, 2021, 6:00pm
19
Oh. Try text button maybe and see if there are any properties that messed with it.
Not_1yo
(Not_1yo)
April 12, 2021, 6:02pm
20
Also, there might be a gui in front of the button that has transparency 1 and visible. Blocks the click. I’m probably wrong though