Text Button not activating while kept in workspace

Hey y’all, quick question about a text button issue I am encountering.

I have a setup where an R15 rig dummy walks down a set path and then turns around and walks back. I created walking and idle animations, and now am attempting to create a text button over his head.

I created a billboard GUI and then inserted a frame, followed by a text button inside the frame.

Here is a video that details the issue:
Issue.wmv (1.6 MB)

I have one script, which is inside the text button. It is a server script which reads as follows:

local button = script.Parent

button.Activated:Connect(function()
	print("hello")
end)

Of course there will be more, I am just using this to test the button.

What solutions have I tried?

Well at first, I figured the issue must have been the code running on a server script inside of the workspace, so I transferred the code into a LocalScript and wrote it as follows:

local button = workspace.R15.Billboard.Frame.TextButton

and then used the same activation code as above.

I also tried simply only using a a billboardGUI and TextButton (so removing the frame) and using the exact same code.

Lastly, I wrote the code in a separate LocalScript inside StarterPlayerScripts, using all variations above, and none worked.

Any help is appreciated, thank you.

1 Like

You were right to pass the code to LocalScript because otherwise it would never work, you were also right to use BillboardGUI as needed, however it will never work because that instance requires additional setting in its properties, exactly something called “Adornee”.
image
You need to link that to a part, in this case I would recommend your npc R15 head, after making that little change try again and it should work for you.

I had an adornee. I actually figured out the issue I believe. You apparently cannot have a textbutton on a billboard GUI in the workspace. It instead needs to be in the player GUI/Starter GUI. If this is wrong, let me know, but the only way I got it to work was by having the GUI in StarterGUI.

2 Likes

Yep, this is correct. Just putting the billboard in StarterGUI and setting it’s adornee should work.

1 Like

So maybe this is a loaded question, but my plan is to have multiple models (just with separate clothes/accessories) and clone them in upon a certain action being performed. If I place the GUI for each of the models into player/starter GUI, will it work fine upon the cloning of said aforementioned models? As they are cloned in, they will begin to walk, with the billboardGUI remaining above their heads.

Yes, it will work out. Just remember to set the adornee to the model / part.

1 Like

It’s wrong, if it’s a possible thing to do, I’d recommend trying to put the ornament anywhere and try it, then just implement it on your npc

I don’t think you realize that throughout the entire process my Billboard GUI has had an adornee. At first it was on the R15 model, and then switched to the head like you stated. However, this did not work, and as I stated, the only way I got it to work was by placing the GUI in starter/player GUI.