Trying to clone a name tag. It doesn’t work. It doesn’t show an error.
game.Players.PlayerAdded:Connect(function(player)
local char = player.Character
if char ~= nil then
if char:WaitForChild("Head") then
local nameTag = script.NametagGui:Clone()
nameTag.Parent = char.Head
nameTag.Frame.SizingFrame.Text.Text = player.Name
end
end
end)
My best guess is that your character hasn’t loaded so instead of doing an if check use
plr.CharacterAdded:Connect(function(char)
if char then else return end
--clone the nametag
end)
full script
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
if char then else return end
--clone the nametag
if char:WaitForChild("Head") then
local nameTag = script.NametagGui:Clone()
nameTag.Parent = char.Head
nameTag.Frame.SizingFrame.Text.Text = player.Name
end
end)
end)