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 » Scripters
Home Search
 

Conditionals

Previous Thread :: Next Thread 
Vitreus_Kaddin is not online. Vitreus_Kaddin
Joined: 02 Jun 2011
Total Posts: 33
13 Aug 2016 11:57 AM
I am new to scripting & I am having an issue with Conditionals, I don't know how to use things in Conditionals like Color3 or Vector3. I hope someone can reply and give me examples using those two (I have no idea what to call them, userdata? tuples?).
For those confused by the word Conditional, it refers to if / else / elseif statements.


Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
13 Aug 2016 12:12 PM
if part.Position == Vector3.new(0,0,0) then -- construct a new one to compare
print("part is in the center of the game!")
end

if button.Color3 == Color3.new(1,0,0) then
print("button is red!")
end

if part.BrickColor == BrickColor.new("Bright green") then
print("part is Bright green!")
end


Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
13 Aug 2016 12:12 PM
button.BackgroundColor3*


Report Abuse
Vitreus_Kaddin is not online. Vitreus_Kaddin
Joined: 02 Jun 2011
Total Posts: 33
13 Aug 2016 12:14 PM
Thankyou so much, you don't believe how helpful that was despite how simple that piece of code seems. I will add you in credits for helpful forumers. :)


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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