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