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: Color3.new Problem

Previous Thread :: Next Thread 
McVisibility is not online. McVisibility
Joined: 17 Sep 2011
Total Posts: 484
21 Jul 2013 05:43 AM
local l = script.Parent

while true do
wait(0.2)
l.Color = Color3.new(255, 167, 58)
wait(0.2)
l.Color = Color3.new(255, 199, 57)
end


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That bit of code should change the Parent's color from orange to some other shade of orange, but what it does, it loops in some large numbers which make the color black, but in-game it actually appears white and doesn't change shades.

I am using this code on a PointLight.


What's the problem?

~~ I love Pandas {◕ᴥ◕} ~~
Report Abuse
McVisibility is not online. McVisibility
Joined: 17 Sep 2011
Total Posts: 484
21 Jul 2013 05:44 AM
The script is so simple...
But I seriously have no idea why it's not changing the color to whatever it's set to.

~~ I love Pandas {◕ᴥ◕} ~~
Report Abuse
Aerr0w is not online. Aerr0w
Joined: 09 Apr 2009
Total Posts: 565
21 Jul 2013 06:06 AM
l.Color = Color3.new(red/255, green/255, blue/255)

Change red green and blue with color values, and this should work.
Report Abuse
McVisibility is not online. McVisibility
Joined: 17 Sep 2011
Total Posts: 484
21 Jul 2013 06:16 AM
Seems to be no help at all.

~~ I love Pandas {◕ᴥ◕} ~~
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jul 2013 06:36 AM
You have your answer...
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
21 Jul 2013 07:23 AM
[ Content Deleted ]
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
21 Jul 2013 07:25 AM
@baheeg is telling a load of crap.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
21 Jul 2013 07:28 AM
[ Content Deleted ]
Report Abuse
einsteinK is not online. einsteinK
Joined: 22 May 2011
Total Posts: 1015
21 Jul 2013 07:30 AM
BrickColor is for everything that's visible in 3D (except billboards)
Color3 is for everything visible in 2D.

You can merge them:

Part.BrickColor = BrickColor.new("Really red")
Same as:
Part.Color = Color3.new(1,0,0) (or 255/255,0,0 but it's the same)

BrickColor.new(Color3.new(1,0,0)) == BrickColor.new("Really red")

BrickColor.new("Really red").Color == Color3.new(1,0,0)

Part.BrickColor.Color == Part.Color
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
21 Jul 2013 07:59 AM
@baheeg It's almost a completely different thing to BrickColor.
You can obtain colours using Color3 which you can't using BrickColor. It's not deprecated, it's a ton better than BrickColor. That administrator didn't know the advantages of Color3. He was wrong.

Lets be honest about :remove() and Destroy() - shall we?
There really isn't much of a difference between them two. The only thing Destroy() does which remove() doesn't is lock the parent property of that item. I wouldn't call remove() deprecated, neither would I call Color3 deprecated.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jul 2013 08:06 AM
Parts do not work with Color3. They instead shift to the nearest BrickColor value. Use BrickColor for parts, and both for GUIs.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
21 Jul 2013 08:07 AM
[ Content Deleted ]
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
21 Jul 2013 08:16 AM
@baheeg Tell me how you'd care about that? There's no use in attempting to do anything with a part that has been removed, you'd have to be stupid. They have little difference, so it isn't deprecated.

As I said, you get a whole load of different colours using Color3 because of its RGB colour mixer. Tell me how this makes Color3 deprecated? It really isn't.

I searched the wiki for a while, it doesn't even mention that Color3 is deprecated. Looks to me like you're making stuff up.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jul 2013 10:01 AM
"As I said, you get a whole load of different colours using Color3 because of its RGB colour mixer."

Not with bricks. As I mentioned, it jumps colors to the nearest palette color, so not even all of the brick colors colors are supported D:
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
21 Jul 2013 10:39 AM
It is because color3 takes values from zero to one.
Report Abuse
SuperOmar54 is not online. SuperOmar54
Joined: 12 Aug 2012
Total Posts: 415
21 Jul 2013 12:13 PM
local l = script.Parent

while true do
wait(0.2)
l.BrickColor = BrickColor.new(255, 167, 58)
wait(0.2)
l.BrickColor = BrickColor.new(255, 199, 57)
end


This could work if it did glad to help. :D
Report Abuse
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
21 Jul 2013 12:24 PM
@notunknown Wasn't referring to Color3 - I was referring to GUIs.

@super Won't work. PointLight only takes Color3 data, not directly BrickColor.
Report Abuse
BattleFieldPwner is not online. BattleFieldPwner
Joined: 05 May 2013
Total Posts: 233
21 Jul 2013 12:29 PM
Does Color3 Value even exist anymore?





---Teh epic red plaid dewd c:---
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
21 Jul 2013 12:30 PM
Neither BrickColor nor Color3 are deprecated. They are each usable and should be used. As for when they should be used, you should be able to determine that.

When using Color3.new, note that all of the arguments must be from 0 to 1 inclusive.
Report Abuse
BattleFieldPwner is not online. BattleFieldPwner
Joined: 05 May 2013
Total Posts: 233
21 Jul 2013 12:36 PM
Can't you use the Color3 Value to make a brick, part, or model a new color?
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