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