|
| 23 Jun 2014 03:58 AM |
function onClicked() if script.Parent.Parent.Vote2.BrickColor == BrickColor.Red() then script.Parent.Parent.Vote3.BrickColor = BrickColor.Red() elseif script.Parent.Parent.Vote1.BrickColor == BrickColor.Red() then script.Parent.Parent.Vote2.BrickColor = BrickColor.Red() else script.Parent.Parent.Vote1.BrickColor = BrickColor.Red() end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
How would I go about continuing this script, so that after the 3rd click and the 3rd brick changes color, when clicking a fourth(and so on) time, another brick will change color. |
|
|
| Report Abuse |
|
|
STRlKES
|
  |
| Joined: 15 Jun 2014 |
| Total Posts: 2176 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
| |
|
| |
|
|
| 24 Jun 2014 10:31 AM |
num = 1 script.Parent.ClickDetector.MouseClick:connect(function() if num == 1 then num = 2 -- stuff elseif num == 2 then num = 3 -- stuff elseif num == 3 then num = 4 -stuff elseif num == 4 then num = 5 -- stuff end end) |
|
|
| Report Abuse |
|
|