BillboardGui TextButton touch pressed event?

This seems like it should be easy, but I can’t figure it out. Does anyone know the event to fire for touching (on a touch device, eg iPad) a textbutton which is inside a BillboardGui. On a normal gui ‘MouseButton1Down’ or ‘MouseButton1Click’ would work; but for some reason on a billboardGui it won’t with touch devices.

Thanks.

10 Likes

Object.InputBegan:Connect(function(Input,GP)

The UserInputService of GUIs :slight_smile:

1 Like

Its still not reacting to the touch.

DId you check for the UserInputType to be Enum.UserInputType.Touch?

Or is it like not printing (even without any ifs) at all when you tap it?

its not printing at all.

Does UserInputService.InputBegan work?

If so, try doing it manually. Check if the touch position is inside the Absolute properties of the object, and if the object is visible.

Normal userinputservice is working fine. There should be an easier way to do this though…

1 Like

Turn the “Active” property off for the BillboardGui’s descendants and that should fix it.

2 Likes

Try any of the following (I might be talking out my hind and you may have already done this):

  • Parent BillboardGui to PlayerGui
  • Button.TouchTap
  • Button.InputBegan
  • Set Active property for descendants
  • Slam your keyboard until something happens (not recommended, but it works for me)

If none of that works, I’m going on a science field trip.

8 Likes

Turn on the Active property on your BillboardGui. After that, MouseButton1 events on GuiButtons in that BillboardGui will work.

2 Likes

Tried that; its still not working. Is it possible the feature is broken?
Are you able to replicate it working?

I’ve started a new place, inserted a billboardgui with a button inside and made a localscript that prints once said button is pressed. Nothing is printing.

BillboardGuiButtonWorking.rbxl (14.7 KB)

  • BillboardGui has to be Active=true
  • The button needs to be within the size of the BillboardGui. Areas of the button outside of the BillboardGui’s actual allocated size will not trigger events.
10 Likes

Right, I see what I did wrong now. Thanks!

1 Like

Apparently Billboard GUIs have to be placed inside of PlayerGui for mouse events to work, unlike Surface GUIs which don’t matter.

46 Likes

Yeah, found that out a while back - quite odd that at the time I couldn’t find any mention of it! Thanks anyway :slight_smile:

2 Likes

Basically to make a clickable BillboardGui, do the following:

  • Make a Part / Attachment
  • Make a BillboardGui, but parent it inside of StarterGui instead of the Part / Attachment
  • Make the Adornee of the BillboardGui to that Part / Attachment you’ve made
  • Inside the BillboardGui make a button in order to make it clickable I guess.
  • Make a script that uses a MouseClick event and have it do something(like print for testing)

E I updated this comment because I wanted to make it better looking lol

22 Likes

such an old post but setting the billboardgui parent to player gui worked for me