After resetting the whole script does not affect the player anymore, how do you fix that?
local player = game.Players.LocalPlayer
while not player.Character do
wait()
end
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.TextStrokeTransparency = 0
text.Active = true
local textcopy = text:Clone()
textcopy.Parent = character.Head.BillboardGui.Frame

1 comment
Try referencing player.Character directly instead of using the character variable in your script. I've had this problem before and directly referencing player.Character fixed it for me.