So this script is suppose to put a billboard gui on top of every player in the server. The problem is it only names the owner

-- Put this script in the StarterGui. 
-- Change  FriendId to the ID of the player that you want

local FriendId = 42664279 

repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Head")
local plr = game.Players.LocalPlayer
local head = plr.Character.Head
if (plr.userId == FriendId) then
	local gui = Instance.new("BillboardGui", head)
	gui.Adornee = head
	gui.Size = UDim2.new( 200, 0, 2, 0)
	gui.StudsOffset = Vector3.new( 0, 3, 0)
	gui.Name = "OwnerGui"
	local rank = Instance.new("TextLabel", gui)
	rank.Name = "Owner"
	rank.BackgroundTransparency = 1
	rank.BorderSizePixel = 0
	rank.ZIndex = 2
	rank.Font = "ArialBold"
	rank.Text = "Owner"
	rank.Size = UDim2.new( 1, 0, 1, 0)
	rank.TextColor3 = Color3.new( 255, 0, 0)
	rank.TextStrokeColor3 = Color3.new( 0, 0, 0)
	rank.TextStrokeTransparency = 0
	rank.TextScaled = true
	rank.TextWrapped = true
	
	else if plr:IsFriendsWith(FriendId) then
	
		local gui1 = Instance.new("BillboardGui", head)
		gui1.Adornee = head
		gui1.Size = UDim2.new( 200, 0, 2, 0)
		gui1.StudsOffset = Vector3.new( 0, 3, 0)
		gui1.Name = "FriendGui"
		local rank1 = Instance.new("TextLabel", gui)
		rank1.Name = "Admin"
		rank1.BackgroundTransparency = 1
		rank1.BorderSizePixel = 0
		rank1.ZIndex = 2
		rank1.Font = "ArialBold"
		rank1.Text = plr.Name.."(Friend)"
		rank1.Size = UDim2.new( 1, 0, 1, 0)
		rank1.TextColor3 = Color3.new( 1, 1, 1)
		rank1.TextStrokeColor3 = Color3.new( 0, 0, 0)
		rank1.TextStrokeTransparency = 0
		rank1.TextScaled = true
		rank1.TextWrapped = true
		
	else
	
		local gui2 = Instance.new("BillboardGui", head)
		gui2.Adornee = head
		gui2.Size = UDim2.new( 200, 0, 2, 0)
		gui2.StudsOffset = Vector3.new( 0, 3, 0)
		gui2.Name = "PlayerGui"
		local rank2 = Instance.new("TextLabel", gui2)
		rank2.Name = "PlayerName"
		rank2.BackgroundTransparency = 1
		rank2.BorderSizePixel = 0
		rank2.ZIndex = 1
		rank2.Font = "ArialBold"
		rank2.Text = plr.Name
		rank2.Size = UDim2.new( 1, 0, 1, 0)
		rank2.TextColor3 = Color3.new( 1, 1, 1)
		rank2.TextStrokeColor3 = Color3.new( 0, 0, 0)
		rank2.TextStrokeTransparency = 0
		rank2.TextScaled = true
		rank2.TextWrapped = true
	end
end

1 comment

0

Is the script a LocalScript? or just a normal Script?