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

Textlabel that shows what team the player is on?

Asked by
Offxd9 0
3 years ago

****Want to know how to script TextLabel that says what team the player is on?

~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~ I need to know how it is if someone can help I appreciate it.

0
Get into the details. What have you done. Where do you think your going wrong. Did you use Teamservice? Please try to include more details Xyternal 247 — 3y
0
Hello, can you specify what you mean by "textlabel that says what team the player is on"? RAFA1608 543 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

Make sure the script's parent is the text label and is a local script

Label = script.Parent --Variable

Label.Text = game.Players.LocalPlayer.Team.Name
0
You see, localscripts dont work when they're not a descendant of a player-relateed object. RAFA1608 543 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

I put it inside the TextLabel you can change it

local player = game.Players.LocalPlayer

local textlabel = script.Parent

textlabel.Text = player.Team.Name

if it works tell me lol

Answer this question