local player = game.Players.LocalPlayer
local character = player.Character
local bg = Instance.new("BillboardGui")
bg.Parent = player.PlayerGui
bg.Adornee = character.Head
bg.Active = true
bg.AlwaysOnTop = true
bg.Size = UDim2.new(1, 0, 1, 0)
bg.StudsOffset = Vector3.new(0, 2, 0)
local bgcopy = bg:Clone()
bgcopy.Parent = character.Head
local frame = Instance.new("Frame")
frame.Parent = bg
frame.Size = UDim2.new(1, 0, 1, 0)
frame.BackgroundTransparency = 1
frame.BackgroundColor3 = Color3.new(1, 1, 1)
frame.Active = true
local framecopy = frame:Clone()
framecopy.Parent = character.Head.BillboardGui
local text = Instance.new("TextLabel")
text.Parent = frame
text.Position = UDim2.new(0.25, 0, 0.25, 0)
text.Size = UDim2.new(.5, 0, .5, 0)
text.BackgroundTransparency = 1
text.Text = (player.NamePl.Value)
text.FontSize = "Size24"
text.TextColor3 = Color3.new(255, 255,255)
text.Active = true
local textcopy = text:Clone()
textcopy.Parent = character.Head.BillboardGui.Frame
I keep getting this error
Players.Player1.PlayerGui.LocalScript:6: attempt to index local 'character' (a nil value)
-I'm new to this, fyi.

4 comments
Similarly, you could use repeat wait() until player.Character end
THANK YOU, IT WORKED
No
end. That's true, though I findrepeatloops to be not as elegant since they require execution at least once (although at least in this case that is of minimal significance). The only difference is the removal ofnot; thenotin my opinion explains the purpose of the body (waiting) betterOkay, thank you BlueTaslem, I will keep that in mind.