Scripting Helpers is winding down operations and is now read-only. More info→
Log in to vote

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

Asked by 10 years ago

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

Log in to vote
Answered by
User#2 0
10 years ago

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

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

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 ="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.

Thanks. I'll try it out. broboch479 15 — 10y

Answer this question