Buttons Parented to Surface Gui Never Work

ImageButton/TextButton never work when parented to a SurfaceGui Object.

I have a Surface Gui with its adornee set to a flat part. In that Gui I have a TextButton.

Under the TextButton is the following LocalScript:

script.Parent.MouseButton1Down:Connect(function()
	print("Clicked")
end)

Entire thing looks like so:

What I have tried so far:

  • Setting all other objects Active property to false
  • Setting the Button’s ZOffset property to very high
  • Disabling All Other UIs
  • Putting the SurfaceGui under StarterGui and then setting its adornee to the part
  • Changing the LocalScript to a Script with RunContext set to Local
  • Checking for parts that could obstruct the SurfaceGui

For some reason the button only works if the SurfaceGui’s AlwaysOnTop property is set to true

please help

Put the SurfaceGui in a ScreenGui in StarterGui, then go to the properties of the SurfaceGui and make the Adornee the Part you are looking to put it on.

I did that, doesnt work, only works with AlwaysOnTop enabled

try getting any parts near by turning locked on and if u have unions try turning collision confidelty to convex precise