|
| 16 Nov 2014 03:15 PM |
I'll start of by saying I'm no excellent scripter, heh....
But how to do I make a GUI, specifically a loadout GUI in this scenario, appear every time someone dies? But only for ONE team, in this case team "Hostiles".
Emperor || Empire of Stratus || Walk Alone; Strive Together |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 03:17 PM |
You can have serpate GUIs.
Having one with some code that states that if their belonging to one team, this GUI is visible. Else This other GUI is visible.
|
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 03:27 PM |
I seem to be struggling, this is what I've got so far:
player = game.Players.PlayerAdded
function onAdded() if player.TeamColor == game.Teams.Hostiles.TeamColor then game.Lighting.Gui:Clone().Parent = player.PlayerGui end end
game.Players.PlayerAdded:connect(onAdded)
This output says: 18:26:08.850 - TeamColor is not a valid member 18:26:08.851 - Script 'Workspace.Team stater packs', Line 5 18:26:08.852 - Stack End
The Hostiles is named correctly in the teams, and the "Gui" is in the lighting. Emperor || Empire of Stratus || Walk Alone; Strive Together |
|
|
| Report Abuse |
|
|
Xsitsu
|
  |
| Joined: 28 Jul 2009 |
| Total Posts: 2921 |
|
|
| 16 Nov 2014 03:34 PM |
It's not working because the function onAdded() does not receive any parameters.
Try this:
function onAdded(player) if player.TeamColor == game.Teams.Hostiles.TeamColor then game.Lighting.Gui:Clone().Parent = player.PlayerGui end end
game.Players.PlayerAdded:connect(onAdded)
and get rid of that bit above it that says:
player = game.Players.PlayerAdded |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 03:49 PM |
Sorry for the late reply, had a shower.
But thanks for the help! It's now working fully functional.
Emperor || Empire of Stratus || Walk Alone; Strive Together |
|
|
| Report Abuse |
|
|