Position of TextButton stops it from detecting presses

Hi, I want the TextButton to detect presses at the position of {0.5, 0},{0.95, 0} and the Anchor Point as 0.5, 0.5.

It works as intended until I set the scale on the Y axis of the position to anything below 0.7; none of the clicks are detected. If I hover over the button, it doesn’t change colour.

The button I’m talking about is the ‘EQUIP’ button below the text ‘Bubble Bunny’. This is in the StarterGui, the button with the errors is highlighted:
Screenshot 2024-03-20 231213

Here’s a video showing it happen:

Here’s a simplified version of the code for all the buttons:

local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local player = players.LocalPlayer

local scrlFrame = script.Parent:WaitForChild("ScrollingFrame")

for i, button in pairs(scrlFrame:GetChildren()) do
	task.wait(1)
	local textBtn = button:WaitForChild("TextButton")
	local bunnyName = button:WaitForChild("TextLabel").Text
	
	if bunnyName == replicatedStorage:WaitForChild("EquippedBunny-"..player.Name).Value then
		textBtn.Text = "UNEQUIP"
	end
	
	textBtn.MouseButton1Down:Connect(function()
		print(button.Name,"clicked!")
		if textBtn.Text == "EQUIP" then
              for i, bunny in pairs(scrlFrame:GetChildren()) do
					if bunny:IsA("ViewportFrame") and bunny.Name ~= "Starter Bunny" and bunny.Name ~= button.Name then
						bunny:WaitForChild("TextButton").Text = "EQUIP"
					end
				end
			textBtn.Text = "UNEQUIP"
		end
		end)
	end

Thanks for reading, any help would be greatly appreciated!

1 Like

Have you checked the Z index of the button in the Properties window?

Try setting it higher than everything else so it will be on top.

Screen Shot 2024-03-20 at 6.54.37 PM

1 Like

I have, it’s higher than everything else. I thought it was that at first too, thanks for the reply.

Make sure there’s no GUI blocking it that has the Active property set to true, it will block input down, even if it’s invisible