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

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

Asked by
notfenv 171
5 years ago
Edited 5 years 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 — 5y
0
you can see the problem with the single line of script he gave CjayPlyz 643 — 5y
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 notfenv 171 — 5y
0
Updated, showing contents. notfenv 171 — 5y

2 answers

Log in to vote
0
Answered by
CjayPlyz 643 Moderation Voter
5 years ago
Edited 5 years 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 643 — 5y
0
P.S. that GUI looks good ;) CjayPlyz 643 — 5y
0
Thanks! :D notfenv 171 — 5y
0
Does it have to be a local script or a normal script? notfenv 171 — 5y
View all comments (3 more)
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 643 — 5y
0
if you want i can make an example. BUT i do really recommend just using the local script in terms of performance CjayPlyz 643 — 5y
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 notfenv 171 — 5y
Ad
Log in to vote
0
Answered by
notfenv 171
5 years ago

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

0
:Children() is deprecated. Use “:GetChildren()” instead Kriscross102 118 — 5y

Answer this question