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

How would I make an overhead GUI that displays a team member's name in green?

I have no idea how to start this one. I made fake heads in the players to make it so you can't see anyone's name. Now I need to make an overhead GUI only seen on your teammates.

1 answer

To do this, when a player spawns on a team, they need to do some stuff on the client.

First you want to loop through all the players. This is a nice and simple for loop that does that.

for i,v in pairs(game.Players:GetPlayers()) do
	-- Do checks
end

Then you want to check if that player is on your player's team.

if v.TeamColor == game.Players.LocalPlayer.TeamColor then
	-- Add the BillboardGui to the Camera
end

Once you've done that you should instance a BillboardGui to your player's camera, and set it's Adornee property to the player who your checking's head.

local bbGui = Instance.new("BillboardGui", game.Workspace.CurrentCamera)
bbGui.Adornee = v.Character.Head

Once you've done that, adding what you want inside of the billboard gui should be as simple as cloning something from ReplicatedStorage, putting it in the bbGui and then changing the text of a TextLabel.

1 comment

0

Thanks. I'll try it out.

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