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

How to make a Billboard GUI in a player's head?

Asked by 10 years ago

I am having trouble with making a character name changer for an RPG game and one answer to a similar question suggested teleporting a billboard GUI into a players head, so to display what the player typed in a screen GUI, above it. I must admit that the Screen GUI and scripts were from a model, it does not display anything over my players head when I tested it. I have tried to learn each part of the script from looking in your provided glossary, but I still have yet to understand which lines preform what function. there are two Text buttons, one is a "set" button, and the other a "view" button. This first one is under the "text button" labeled "view".

local player = script.Parent.Parent.Parent.Parent.Parent

function click() 
m = Instance.new("Message") 
m.Parent = player 
m.Text = player.Character.Name 
wait(5) 
m:Remove() 
end 

script.Parent.MouseButton1Click:connect(click)

And this script is under "set".

local player = script.Parent.Parent.Parent.Parent.Parent 

function click() 
player.Character.Name = script.Parent.Parent.TextBox.Text 
end 

script.Parent.MouseButton1Click:connect(click)

the whole GUI is stacked:

(Screen Bui) Gui Main
    Frame
        Text Box
        Text Button (View)
            script (view script)
        Text Button (set)
            script (set script)
        Text Label

If anyone feels something here needs clarification, please let me know. Thank You.

0
I was looking over the models comment section, and I saw that a Roblox Update may have stopped this from working properly. If this is the case, please provide an alternate way to script this. bomber12312 0 — 10y
0
Any tips would be helpful... bomber12312 0 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

With billboard gui's, there is a property called Adornee. Adornee is an object that the billboard gui positions itself over.

Here is some example code of how to set the adornee property of a billboard gui.

local gui = game.Workspace.gui
gui.Adornee = game.Workspace.Part
0
Thank you. bomber12312 0 — 10y
Ad

Answer this question