Why isn't this image button detecting a click?

  1. 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

What’s the hierachy of your Gui that contains the image buttons? I think something is wrong there?

Here’s a picture of them.

image
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.

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.

Did you path it correctly maybe?

Yes I did. (limit ahahhaahahah)

Actually what I would do is make another textbutton and make it invisible and put it on top

1 Like

Sounds unprofessional but its decent

That’s what I did so there is a wider range.

1 Like

Did you do image button or text lol. In the title you said image?

1 Like

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

Oh. Try text button maybe and see if there are any properties that messed with it.

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