darkwisp
|
  |
| Joined: 07 Apr 2010 |
| Total Posts: 22653 |
|
|
| 30 Dec 2013 12:10 PM |
Once I added the if statement checking the players team color. It stopped working. ------------------------------------------------------ Turn = game.Workspace.DefenderTeamTurn.Value local CD = script.Parent local function onMouseClick(Player) local Brick = CD.Parent if Brick:IsA("BasePart") then if Player.Character.Energy.Value > 5 then if Turn == true then if Player.TeamColor == ("Bright violet") then print("Legit") Player.Character.Energy.Value = Player.Character.Energy.Value - 5 Player.Character.Torso.CFrame = Brick.CFrame end end if Turn == false then if Player.TeamColor == ("Really red") then print("Legit") Player.Character.Energy.Value = Player.Character.Energy.Value - 5 Player.Character.Torso.CFrame = Brick.CFrame end end
end end end
CD.MouseClick:connect(onMouseClick) ----------------------------------------------------
{_=-::Vekronian Guard::]-=_} |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 12:11 PM |
if Player.TeamColor == BrickColor.new("Bright violet") then -- stuff end
The TeamColor property actually contains a BrickColor value. |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 12:15 PM |
| Umm... You have too many if's. |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 12:27 PM |
| dont listen to lurky its impossible to have to many if's XD |
|
|
| Report Abuse |
|
|
darkwisp
|
  |
| Joined: 07 Apr 2010 |
| Total Posts: 22653 |
|
|
| 30 Dec 2013 12:45 PM |
@lukey I dont even.... Have you seen most turn based strategy games?
{_=-::Vekronian Guard::]-=_} |
|
|
| Report Abuse |
|
|