Trying to detect click on Frame but gets blocked by image label

I have a script that will run code when it detects a click on frame
However, the frame in question has both a TextLabel and ImageLabel
Clicking on the TextLabel still detects a click on the frame
But not the ImageLabel.

Any properties I need to change? Or should I come at it a different way?

Script:

--Class Select is a scrolling frame, Screenshot of hierarchy is below for explanation
for _, obj in pairs(ClassSelect:GetChildren()) do
	if obj:IsA('Frame') then
		obj.InputBegan:Connect(function(input)
			if input.UserInputType == Enum.UserInputType.MouseButton1 then
				print('clicked')
			end
		end)
	end
end

(The selected frame in the image is the frame in question)
image

You could try changing the Zindex of the TextLabel and ImageLabel.

What is Zindex Behaviour?

I tried lowering Zindex for both the TextLabel and ImageLabel to negatives and the Zindex above one but nothing changed :frowning:

image

1 Like

Thats also ticked off
image

Could you send a screenshot of what the GUI looks like and a video of what happens?

Sorry for the delay, here it is edited to be clearer
Yellow is the Frame
Orange is the ImageLabel
Red is the TextLabel

Ik this post was from April but have you found a workaround for it blocking the click?

None at all, just kind of accepted that fact :person_shrugging: