New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
1

# How do I make this GUI show your team and GUI? I've already tried a script myself.

Edited 5 months ago

So, I'm trying to make a border game. And I have this "player information" GUI. I am trying to make it so the bottom line shows if your in the group or team, if you can help me with one of those then great! First off, I'll show you the GUI. !Player Information GUI And heres a script I tried to do.

script.Parent.Text = script.Player.Team.Name


Please note I am not good at scripting. Basically, if you choose an option between scripting the group or team then I will pick a script that you guys have said. Please help!

Contents btw !contents If you wanna try out the game then here. https://www.roblox.com/games/3012369787/Papers-Simulator-NEW-MAP

0
Could you explain what your problem is? You mentioned your attempt at a script without providing the result you got. BlueGrovyle 278 — 5mo
0
you can see the problem with the single line of script he gave CjayPlyz 458 — 5mo
0
Okay, you know those GUIs that display your information? Like name, etc. They sometimes have like this "team" or in [group name] bla bla bla, I'm trying to make something like that. @BlueGrovyle kanchoplets 25 — 5mo
0
Updated, showing contents. kanchoplets 25 — 5mo

0
CjayPlyz 458
5 months ago
Edited 5 months ago
script.Parent.Text = game.Player.LocalPlayer.Team


Alternative :

local Player = game.Player.LocalPlayer
script.Parent.Text = Player.Team


You don't really need to add ".Name" in Team.Name. This script only works in local script since i used game.Player.LocalPlayer but you can change it.

script.Parent.Text = script.Player.Team.Name


I also noticed that you did "script.Player.Team.Name" I don't really get what you mean, but I'm guessing that there is an object value in the script if I'm right you could have did this instead :

local Player = script.Player
script.Parent.Text = Player.Team


if it was a string value then

local Player = script.Player
script.Parent.Text = game.Players[Player.Value].Team


P.S. that GUI looks awesome.

EDIT : You can't access the StarterGUI or the GUI's inside it using a normal script, that is because StarterGUI is cloned into the client which means it wont replicate to the server. So the only way to access it is with a local script, but you can use remote events to do this.

0
P.S. that GUI looks good ;) CjayPlyz 458 — 5mo
0
P.S. that GUI looks good ;) CjayPlyz 458 — 5mo
0
Thanks! :D kanchoplets 25 — 5mo
0
Does it have to be a local script or a normal script? kanchoplets 25 — 5mo
0
sorry, i just saw your comment now. it does have to be a local script but you can make it so it does. ill edit my answer to explain. CjayPlyz 458 — 5mo
0
if you want i can make an example. BUT i do really recommend just using the local script in terms of performance CjayPlyz 458 — 5mo
0
it doesnt work any of them, it displays their team in the text, thats what i want, and i've tried the local script but idk kanchoplets 25 — 5mo
0

This question has been answered by me! I looked in free models and got this show team gui, I changed some assets in it and now it looks like this.

local team=script.Parent


local player=team.Parent.Parent.Parent

local teams={}

for i,v in pairs(game.Teams:children())do

table.insert(teams,v)

end

while wait(.25)do

for a,b in pairs(teams)do

if b.TeamColor==player.TeamColor then

team.Text=" "..b.Name.." "

end

end

end