Hello
I’m trying to create a name tag but my script is failing so when I try it the name tag doesn’t appear,and i need solution with my script
And this is my script
local rep = game:GetService("ReplicatedStorage")
local nametag = rep.NameTag
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local head = char.Head
local newtext = nametag:Clone()
local uppertext = newtext.UpperText
local lowertext = newtext.Lowertext
newtext.Parent = head
newtext.Adornee = head
uppertext.Text = player.Name
if player.Name == "DeV_VcR" then
lowertext.Text = "Owner"
lowertext.TextColor3 = Color3.fromRGB(3, 251, 255)
end)
end)
This is what i want
And This is when i test in game and its doesn’t appear
maybe put capitals like LowerText not Lowertext
ROBLOX lua is very sensitive with every letter and it must be in correct capitals otherwise it doesnt read it and it wont work
The only problem is with the Frame objects. Are their Visible property turned off? If so, turn them on. That’s the cause of making the GUI look invisible and hardily seeing them.
Actually, would like to ask you if the code that you have there is placed in the ServerScriptService & in a script or not, as you seem to be a beginner scripter, it can be a confusion to you.
s I think I know what’s the problem now. There should be a :WaitForChild on the character’s head. I see how the script wants to insert the GUI instantly when the character’s added onto the game. What happens is that if the head isn’t included in the character when it’s added onto the workspace, the script will return an error. The script must wait for the head to be added in the character model; therefore, the GUI should appear adequately without issues.
char.Head is different. The script is attempting to find the character’s head once the character added fired with the character. char:WaitForChild"Head" would wait for an object named “Head” to be added, returning the found awaiting object.
I was once having this similar issue when I was making custom nametags.