The script has a BillboardGui inside that I want placed onto a player's head if they are on a certain team in-game, but it doesn't work even when I'm on the right team.
local title = script.BillboardGui
local red1 = 0
local green1 = 0
local blue1 = 0
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Team == "Security Department" then
local newGUI = title:Clone()
newGUI.TextLabel.TextColor3 = Color3.fromRGB(red1,green1,blue1)
newGUI.TextLabel.Text = "Security Department"
newGUI.TextLabel.Parent = character.Head
end
end)
end)

2 comments
I tried it, but the title still wasn't placed on the player's head
You can do this either way. Though, it doesn't change the script in any way.