Input Events Not Firing In Billboard Guis

InputBegan/End, MouseButton1Down, etc. events do not fire for ImageButtons inside BillboardGuis in the PlayerGui.

Repro:

  1. Open a new place
  2. Insert a BillboardGui into StarterGui
  3. Insert an image button into the BillboardGui
  4. Set the BillboardGui adornee to a part in workspace, offset the gui upwards to make it visible if needed.
  5. Insert a LocalScript into the BillbaordGui:
print("Local script running")
script.Parent.ImageButton.InputBegan:Connect(function(Input)
	print("Input Began:",Input.KeyCode)
end)
script.Parent.ImageButton.MouseButton1Down:Connect(function()
	print("Mouse1 Down")
end)
  1. Start test in window or a local server.
  2. Expected result: The InputBegan and Mouse1 Down are printed to the console when clicking the button, Input Began is printed when a touch events slides over the button.
    Actual Result: The script runs, but no events are fired.

This appears to be a recent bug in the last week or so.

3 Likes

billboardexample.rbxl (16.7 KB)

Seems to work for me. Maybe the missing piece is setting BillboardGui.Active = true? This should probably be the default when inserting a new billboard gui in studio, I’ll see if we can make this change.

4 Likes

I always forgot about that! This fixed the issue - should I make a feature request to enable it by default, as it is pretty unintuitive.

(I also think one of my plugins may have been messing with the Active property, as archived versions of some of my projects had this issue as well when they were previously working.)

1 Like

What? I seriously thought I was in the wrong when I tried getting input from a billboardgui a few weeks ago and made my own input system from scratch.

This definitely needs to be default behavior.

2 Likes

Stop the presses, there really is a bug!
This time, all the UIElements definitely have active set to true, with nothing interfering with them. But when set up like this:
image
With the local script being the same as before, but obviously pointing to the new location of of the button. The module script is left blank and is not required by the local script. The button inside the BillboardGui does not register input events, however, if after running the place you move the image button out of the billboard gui, and make it a child of the ScreenGui, it will start registering input.

Place File: BillboardBug.rbxl (19.0 KB)

Thanks, we will look into this.

Out of curiosity, why structure a UI like this? Specifically, why use a ScreenGui, and nest a BillboardGui as a descendant?

It was being used as a container for components of a vehicle system. The vehicles local scripts/modules needed to be delivered to the player, independently of the game (For free model usage).

Interestingly the BillboardGui does seem to work when I make it a direct descendant of the ScreenGui

I don’t think this issue has been resolved, as I’ve found another instance where it occurs. Check out the attached file for the setup or listen to my explanation:

The setup is similar but different this time. I have a ScreenGui reparented from ReplicatedFirst to StarterGui, where the BillboardGui parented under a module script has it’s adornee set to an NPC. The BillboardGui’s setup is the same as madattak’s.

I’ve examined that it does work when the ScreenGUI is initially parented under StarterGUI, not when it’s reparented from ReplicatedFirst to ScreenGUI. I’ve made sure that the BillboardGUI is parented under PlayerGui, it’s properly adorned, and it’s relevant children have their Active properties set to true. Nothing in the output coming from the input event.

Another very important detail I noted: this setup works in a “real” server (publishing to roblox and clicking play), but doesn’t work in studio even in a single player test server.

imagebutton_on_billboardGUI.rbxl (34.2 KB)

1 Like