Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I need help with a script?

So I made a script that will make a billboardgui above the characters head showing their name but I want it to where the default name doesn't show up "roblox coregui" how would I edit that?

heres my script

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)
char.Name = ""




2 answers

✓ Accepted answer

When a character is added, set the NameOcclusion property of the new humanoid to "OccludeAll"

Ex.

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(c)
c:WaitForChild'Humanoid'.NameOcclusion = "OccludeAll"
end)
end)
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(c)
c:WaitForChild'Humanoid'.NameOcclusion = "OccludeAll"
end)
end)

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)
char.Name = ""


--- The comment above or below me (lol) is right add the occlusion.
---GoodkidMad

Should work now.

This discussion is preserved as it was. New answers, comments, and votes are closed.