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

How to set a click Listener on BillboardGui or descent?

Asked by 7 years ago
Edited 7 years ago

I have a BillboardGui, and a ImageButton as a child of the BillboardGui, I set a click listener, but it doesn't work, this is an example of the click listener that I try to use:

billboard.ImgMaterials.MouseButton1Click:Connect(function() print("click") end)
billboard.ImgMaterials.MouseButton1Up:Connect(function() print("clickUp") end)
billboard.ImgMaterials.MouseButton1Down:Connect(function() print("clickDown") end)
billboard.ImgMaterials.MouseEnter:Connect(function() print("clickEnter") end)
billboard.ImgMaterials.MouseLeave:Connect(function() print("clickLeave") end)
billboard.ImgMaterials.MouseMoved:Connect(function()  print("clickMove") end)

Any help will be appreciated

0
Look at the output. cabbler 1942 — 7y
0
there is no output D: LordSalchipapas 96 — 7y

1 answer

Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
7 years ago

In order to get clicking input, BillboardGuis have to be located in the PlayerGui and the events must run in a LocalScript.

Don't forget that by placing it inside the PlayerGui, you have to set the Adornee property and it will only be visible to that player.

Ad

Answer this question