Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isn't my title being placed above my character's head?

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)

1 answer

if player.Team == "Security Department" then a team is not a name, it's a team instance. You'd have to do player.Team == game.Teams["Security Department"]

2 comments

0

I tried it, but the title still wasn't placed on the player's head

0

You can do this either way. Though, it doesn't change the script in any way.

This discussion is preserved as it was. New answers, comments, and votes are closed.