I have made a script where once you join the game it gives you an overhead GUI, but when there are 2+ people in-game the new player doesn’t get given the GUI. What is wrong?
local NameTagGui = script.NameTags
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local NameTagClone = NameTagGui:Clone()
NameTagClone.Holder.Username.Text = player.Name
if player.UserId == 1630669056 or player.UserId == 729513198 or player.UserId == 1871509831 or player.UserId == 1866443684 then
NameTagClone.Holder.Icon_Owners.Position = UDim2.new(0.47, 0, 0.3, 0)
NameTagClone.Holder.Icon_Owners.Visible = true
NameTagClone.Holder.Icon_Staff.Position = UDim2.new(0.27, 0, 0.3, 0)
NameTagClone.Holder.Icon_Staff.Visible = true
end
if player.UserId == 1 then
NameTagClone.Holder.Icon_Staff.Visible = true
end
NameTagClone.Parent = character.Head
end)
end)
No errors in console.