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

script that only works for 1 team and shows a gui for them?

Asked by 4 years ago

hi, i want to make a script to find out what team somebody is in, for example, if you are in red team there is a gui that shows a text label, and for everybody else that isn't in red its diffirent.

so if somebody is in red, they have a text box with a secret password for only red team, and blue team have their own password

plz help, I'm not good at scripting when it comes to local stuff

I'm not asking for an exact script, just how to find out what team somebody is in, and if they are in it they have a guy that only they can see, i can edit it from there, just a concept

0
include code pls matiss112233 258 — 4y
0
yeah the thing is i dont have any code, i need a concept for what to do, just replace then with like print or something and i can edit it to fit my workspace, all i want is a way to check what team a player is on when they spawn in 123jangamer321 28 — 4y

1 answer

Log in to vote
0
Answered by
sngnn 274 Moderation Voter
4 years ago

There's a page on the developer site about local scripts. It doesn't really give the information you'd probably be looking for, though.

With that out of the way:

Get the player using game.Players.LocalPlayer (and using a variable would be helpful, too). Then, use the .Team property of that player, and check what team they're on. Then, depending on that team, create the GUI inside of their PlayerGui. Really, that's all.

I'll add more/reply if you need more help.

Ad

Answer this question