Text button don't work on Billboard Gui

So i try to create script when player click with left button on text button on billboard gui it starts to run the code, but it looks like i can’t click it at all, it is problem in Billboard Gui? I tried two codes,but they don’t work. Also i tried both codes on local script and basic script, also i tried to replace MouseButton1Click event with MouseButton1Down event and MouseButton1Up.
Code 1:

script.Parent.MouseButton1Click:Connect(function()
	print("test")
end)

Code 2:

local OpenPetButton = script.Parent
local function OpenPet()
	print("test")
end
OpenPetButton.MouseButton1Click:Connect(OpenPet)
2 Likes

are you using a localscript and is this script placed in workspace?

2 Likes

I used local and not local, as i said and it placed in text button, so yes in workspace.

1 Like

I am pretty sure that problem is that i can’t click it at all, but i don’t know why.

change the parent of the localscript to startergui(or StarterPlayerScripts). It won’t work if you keep it in workspace

2 Likes

I tried it, still don’t work.

can you see anything on the output?

1 Like

No

Maybe the reason is this warning?


But it looks liket it’s new feature with realistic face when you can move it by using camera, so i don’t think this is reason.

Hey there, your problem can be solved by moving the BillboardGui into StarterGui. Note that you can maintain the visuals of the billboard by setting it’s “Adornee” property to be the part you want it to appear on.

4 Likes

Thank you very much, i looked for solution for like 2 days.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.