Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you increase the range of a SurfaceGui button?

Asked by 5 years ago

Hello,

Context: - I’m making a SurfaceGui button for my game.

Problem: - To press the button, your character has to be very close (almost touching) the part of which the button is being displayed on.

The button is in PlayerGui, and is then displayed onto the appropriate part in the workspace using the Adornee property of the SurfaceGui.

I have got no idea how to increase the clickable range of the button, as there is no property in the button to allow you to do this. Could this be through the ZOffset, ToolPunchThroughDistance, ZIndexBehavior or LightInfluence properties?

Any advice/solutions you can give would be appreciated.

Tweakified

0
make it into a click detector instead Gameplayer365247v2 1055 — 5y
0
Later in my script, I change the text of the button. I need this to be local to the client. A click detector would not give this result. Is there a quick fix to the SurfaceGui range? Tweakified 117 — 5y
0
Actually i just tested it in studio and the surface gui has a huge range can i see your code? Prestory 1395 — 5y
0
script.Parent:FindFirstChild("Button").MouseButton1Click:Connect(function() Tweakified 117 — 5y
View all comments (3 more)
0
I mean the whole of the code edit your answer and post it in a lua block Prestory 1395 — 5y
0
I am out at the moment. I will get back to you. Tweakified 117 — 5y
0
I managed to fix this by changing to ClickDetectors. Thanks for your help Tweakified 117 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

The issue here wasn't the TextButton, it was the broken roblox unions. These unions made it so that you couldn't click the buttons in certain areas. After removing these unions, the problem was solved.

Ad

Answer this question