I'm trying to make it to where you can see a BillboardGui on top of your team-members only, but I can't get it to work. This is in a LocalScript in Workspace.
wait(1)
local player = game.Players.LocalPlayer
if player.TeamColor == BrickColor.new("Bright red") then
for _,v in pairs(game.Players:GetPlayers()) do
if v.TeamColor == BrickColor.new("Bright red") then
local tag = Instance.new("BillboardGui", v.Character.Head)
tag .Size = UDim2.new(0, 50, 0, 60)
tag .StudsOffset = Vector3.new(0, 4, 0)
local frame = Instance.new("Frame", tag )
frame .Size = UDim2.new(0, 50, 0, 60)
frame .BackgroundColor3 = Color3.new(181/255, 0, 0)
frame .BorderColor3 = Color3.new(181/255, 0, 0)
local textLabel = Instance.new("TextLabel", frame)
textLabel.Size = UDim2.new(0, 50, 0, 60)
textLabel.BackgroundTransparency = 1
textLabel.Font = "ArialBold"
textLabel.FontSize = "Size48"
textLabel.Text = "Friendly"
textLabel.TextColor3 = Color3.new(1, 1, 1)
end
end
end

1 comment
Thanks! It works! I +1'd your Reputation! By the way, if have another problem if you can possibly help me with it. Now, it works, but it shows the BillboardGui even when I'm not on the same team as the player even though I instructed it to not do that. Can you help me? Thanks in advance.