I made a nametag but it seem to not get cloned into players head
I also tried using youtube and the toolbox but they all have the same problem, I dont know if roblox changed how this work or its a bug
Script
local Players = game:GetService("Players")
local Rep = game:GetService("ReplicatedStorage")
local OverheadGui = Rep.NameTag
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local newOverheadGui = OverheadGui:Clone()
newOverheadGui.Parent = char:FindFirstChild("Head")
local DN = newOverheadGui.Display
local UN = newOverheadGui.Username
local Rank = newOverheadGui.Rank
DN.Text = plr.DisplayName
UN.Text = "@" .. plr.Name
local owners = {848127592}
for i,v in pairs(owners) do
if v == plr.UserId then
Rank.Text = "Owner"
Rank.TextColor3 = Color3.new(0.282353, 0.415686, 0.286275)
end
end
end)
end)
let me know if I mssed anything important because this is how I always ued to do it, thank you for the help
It appears you’re not setting the Adornee property of the GUI, which will prevent it from being visible. Setting newOverheadGui.Adornee to the character’s head might work.
Its a server-sided script that is parenting it to the player. The NameTag is stored, right now, in ReplicatedStorage which handles the client stuff. The NameTag should be in ServerStorage since its being parented to the player from the server. Otherwise its exploitable. Im not too sure if thats not the case?
it still doesnt work, using ServerStorage also doesnt work, also, I opened and old file that have a nametag and its not working too, the last time I opened it it still works and it just doesnt anymore
Okay. Can you tell if the PlayerAdded event is actually working? The player might’ve joined before the script started, in which case you’d need to loop through all the players who are in the game and run the function. Then, connect the event to it.