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

I need help with a billboardgui script?

Asked by
Prioxis 673 Moderation Voter
10 years ago

i'm trying to make a script that will insert a billboard gui with a textlabel into the players workspace model but the script i have isn't that great

local Name = Instance.new("BillboardGui")
Name.Parent = game.Workspace.

i'm kinda stuck on that because I don't know how to find the workspace character from the name based off of the script which will be located in the players StarterGUI ... So how would I make a script that will be in the starterGUI that will find the model with the same exact name it has in the players list if you get my drift

local Name = Instance.new("BillboardGui")
Name.Parent = game.Workspace.CHARACTERSNAME
Name.Size = {1, 0}, {1, 0}
wait(0.1)
local Text = Instance.new("TextLabel")
Text.Parent = script.Parent.BillboardGui
Text.Text = script.Parent.Parent.Parent.Name -- Third parent is players workspace head
end
0
It'll basically be like the name gui in murder Mystery Prioxis 673 — 10y

1 answer

Log in to vote
1
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
local plr = game.Players.LocalPlayer
repeat wait() until plr and plr.Character

local char = plr.Character
local head = char:WaitForChild("Head")
local sg = Instance.new("BillboardGui", char)
sg.StudsOffset = Vector3.new(0,1.5,0)
sg.Size = UDim2.new(1,0,1,0)
sg.Adornee = head

local txt = Instance.new("TextLabel", sg)
txt.BackgroundTransparency = 1
txt.TextColor = BrickColor.random()
txt.Font = "ArialBold"
txt.FontSize = "Size18"
txt.Text = plr.Name -- player name
txt.Size = UDim2.new(1,0,1,0)


Ad

Answer this question