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

Why isn't the mouse detected by the ImageButton in a BillboardGui?

Asked by 5 years ago

Hello, I want to activate a function when the mouse clicks an ImageButton, witch is in a BillboardGui.

The script bellow is in StarterGui

local part = workspace.Part
local ui = part:WaitForChild("billboard")
local img = ui:WaitForChild("click button")

img.MouseEnter:connect(function()
    print("mouse enter")
end)

img.MouseButton1Click:connect(function()
    print("clicked")
end)

Nothing prints and no error appears. Please help me!

0
at line 1 its "local part = workspace:WaitForChild("Part")" 0_Halloween 166 — 5y

Answer this question