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
 

Re: if, then statements help..

Previous Thread :: Next Thread 
SuperPurpleBeam is not online. SuperPurpleBeam
Joined: 22 Jul 2014
Total Posts: 228
30 Nov 2014 03:20 PM
local light = Instance.new("PointLight", Block) -- adds light to the Block
if (Block.BrickColor = "Really Red" )) then -- this where the problem is
light.Color = 255, 0, 0 -- adds red light to the brick instead of white light..

Please help.... :(




Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
30 Nov 2014 03:24 PM
That's a Color3, they're set up as Red, Green, Blue.

If you want white use 255,255,255.

light.Color = Color3.new(255,255,255)
Report Abuse
sidekick601 is not online. sidekick601
Joined: 27 Feb 2012
Total Posts: 8734
30 Nov 2014 03:25 PM
local light = Instance.new("PointLight, Block)
if Block.BrickColor == ("Really red") then
light.Color3 = Color3.new(1, 0, 0)
end -- try this
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
30 Nov 2014 03:26 PM
oh, you worded that weird, I thought you meant you wanted it to show up as white.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
30 Nov 2014 03:29 PM
Can't compare BrickColor to a string
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
30 Nov 2014 03:32 PM
if Block.BrickColor == BrickColor.new("Really red") then
Report Abuse
SuperPurpleBeam is not online. SuperPurpleBeam
Joined: 22 Jul 2014
Total Posts: 228
30 Nov 2014 08:30 PM
ok thanks guys.. i got the if statement right but not the color light..
Report Abuse
GeoVolcano is not online. GeoVolcano
Joined: 05 Jul 2012
Total Posts: 1433
30 Nov 2014 08:35 PM
Color3.new(Insert color here, Insert color here, Insert color here)

1.Take the colors ( 0 - 255 )
2.Get a calculator
3. Take the color # and divide by 255 for each
4. Insert color here

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