generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Add another action?

Previous Thread :: Next Thread 
FrostyBite1 is not online. FrostyBite1
Joined: 21 Jan 2011
Total Posts: 54
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 is not online. STRlKES
Joined: 15 Jun 2014
Total Posts: 2176
23 Jun 2014 03:59 AM
elseif
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
23 Jun 2014 04:02 AM
[i]
Report Abuse
FrostyBite1 is not online. FrostyBite1
Joined: 21 Jan 2011
Total Posts: 54
23 Jun 2014 08:54 PM
bump
Report Abuse
TheLuaUser is not online. TheLuaUser
Joined: 22 May 2012
Total Posts: 1405
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image