Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 02 Aug 2015 04:55 PM |
function MyGame:SetUpFlagConnections() for _, child in pairs(game.Workspace:GetChildren()) do if child and child:FindFirstChild('FlagScript') then local captureEvent = child.FlagScript:FindFirstChild('FlagCaptured') if captureEvent then captureEvent.Event:connect(function(player) if not MyGame:RoundOver() then MyGame.IncreasePlayerScore:Invoke(player, 'Captures', 1) MyGame.IncreaseTeamScore:Invoke(player, 1) MyGame:RoundOver() end end) else print("event missing from flag script") end end end end
Above is the script [Part of it] how can I make it so that when a player [on a team etc: red or blue] when they score that it adds + 1 to the main gui but it has to be so that it goes to their team so: RedScoreGui or BlueScoreGui |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
| |
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
| |
|
igunaa
|
  |
| Joined: 15 Sep 2010 |
| Total Posts: 2588 |
|
|
| 02 Aug 2015 05:43 PM |
Since you`re using CustomEvents it gets hard to tell.
Said the wise. |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 02 Aug 2015 05:45 PM |
| I just need a function so that when it gets captured that it adds +1 to the team that captured it... |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
| |
|