|
| 02 Sep 2013 11:15 AM |
...if the player is on the Black team?
function Click(mouse) if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow") end end
script.Parent.MouseButton1Click:connect(Click)
|
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 02 Sep 2013 11:17 AM |
function Click(mouse) if mouse.TeamColor == "Black" then if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow") end end end
script.Parent.MouseButton1Click:connect(Click)
I'm not sure that's what you want but if you click it and you're on black team you'll get put on yellow team if you're in the group you specified. |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 11:17 AM |
| check if the player is on that team and if he is then dont run it |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 02 Sep 2013 11:18 AM |
Oh I get it now you don't want black team to do it, okay this is the script you want:
function Click(mouse) if mouse.TeamColor ~= "Black" then if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow") end end end
script.Parent.MouseButton1Click:connect(Click) |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 02 Sep 2013 11:23 AM |
function Click(mousex, mousey) if script.Parent.Parent.Parent.Parent.Parent.TeamColor.Name ~= "Black" then if script.Parent.Parent.Parent.Parent.Parent:IsInGroup(945312) then script.Parent.Parent.Parent.Parent.Parent.TeamColor = BrickColor.new("Bright yellow") end end end script.Parent.MouseButton1Click:connect(Click) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 02 Sep 2013 01:58 PM |
function Click(mouse) if mouse.TeamColor ~= "Black" then if mouse:IsInGroup(945312) then mouse.TeamColor = BrickColor.new("Bright yellow") end end end
script.Parent.MouseButton1Click:connect(Click)
that should work |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2013 02:19 PM |
thanks it works but i changed it to this
function Click(mouse) mouse = script.Parent.Parent.Parent.Parent.Parent if mouse.TeamColor ~= "Black" then if mouse:IsInGroup(945312) then mouse.TeamColor = BrickColor.new("Bright yellow") end end end
script.Parent.MouseButton1Click:connect(Click) |
|
|
| Report Abuse |
|
|