liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 25 Apr 2012 05:29 PM |
local script6 = game.Players.LocalPlayer.PlayerGui.TeamGui.backround.TextButton.script6 local player = game.Players.LocalPlayer local teamgui = script6.Parent.Parent.Parent
player.CharacterAdded:connect(function(character)
if (player.TeamColor == game.Teams["Green Team"].37) then teamgui:destroy() end
if (player.TeamColor == game.Teams["Red Team"].1009) then teamgui:destroy() end
if (player.TeamColor == game.Teams["Yellow Team"].1010) then teamgui:destroy() end
if (player.TeamColor == game.Teams["Blue Team"].1004) then teamgui:destroy() end
end)
and the output is 16:29:34 - Players.liavt.PlayerGui.TeamGui.backround.TextButton.script6:7: ')' expected near '.37' even though there is a parentheses there.
btw its supposed to make it that if your on blue,green,yellow,or red team a certain gui will be destroyed
|
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
| |
|
|
| 25 Apr 2012 06:37 PM |
local player = game.Players.LocalPlayer local teamgui = player.PlayerGui.TeamGui player.CharacterAdded:connect(function() if player.TeamColor == BrickColor.Green() or player.TeamColor == BrickColor.Red() or player.TeamColor == BrickColor.Blue() or player.TeamColor == BrickColor.new("Bright yellow") then teamgui:destroy() end end) |
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 26 Apr 2012 07:03 AM |
@above not working, im on the green team and the teamgui appeared. but the output is not saying a mistake. ???? |
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 26 Apr 2012 07:04 AM |
| and also i noticed for the yellow team your changing the team TO be yellow. shouldnt it be brickcolor.yellow not brickcolor.new(yellow) |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2012 07:30 AM |
| No, you don't know what you're saying. |
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 26 Apr 2012 03:39 PM |
| whatever, its not working. i just said what i THOUGHT the problem was, but if it is wrong, than what is the real problem? |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 Apr 2012 03:43 PM |
local script6 = game.Players.LocalPlayer.PlayerGui.TeamGui.backround.TextButton.script6 local player = game.Players.LocalPlayer local teamgui = script6.Parent.Parent.Parent
player.CharacterAdded:connect(function(character)
if (player.TeamColor == game.Teams["Green Team"].TeamColor) then teamgui:destroy() end
if (player.TeamColor == game.Teams["Red Team"].TeamColor) then teamgui:destroy() end
if (player.TeamColor == game.Teams["Yellow Team"].TeamColor) then teamgui:destroy() end
if (player.TeamColor == game.Teams["Blue Team"].TeamColor) then teamgui:destroy() end
end)
Sorry I'm not really doing much, tired and don't feel like thinking. QQ |
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 26 Apr 2012 03:46 PM |
@above isnt that the exact same script i started with? |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 Apr 2012 03:48 PM |
Yes, but I don't get what the .37 and .1003 is...
You could just say TeamColor, since the number is obviously causing the error.
This is what the output meant:
')' expected near .37 Means that it wants you to close the parenthesis so it can multiple what's in the parenthesis by 0.37
Just right teamcolor and I so no issue |
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 26 Apr 2012 03:50 PM |
| the numbers are the brickcolor code, and i just noticed the 0. is there and is not supposed to :/ |
|
|
| Report Abuse |
|
|
liavt
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 1241 |
|
|
| 26 Apr 2012 03:51 PM |
@ilikeyou your script works! thank you. |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 Apr 2012 03:52 PM |
Does it really matter? TeamColor works the exact same and won't cause the problem.. Just try it T_T
write* |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2012 09:17 PM |
I made it much shorter.
local c = {"Green","Red","Yellow","Blue"} local player = game.Players.LocalPlayer player.CharacterAdded:connect(function() for _,v in ipairs(c) do if player.TeamColor == game.Teams[v.." Team"].TeamColor then player.PlayerGui.TeamGui:Destroy() end end end) |
|
|
| Report Abuse |
|
|