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: Please help! Color3.new is being a derp

Previous Thread :: Next Thread 
materking1234 is not online. materking1234
Joined: 20 Nov 2008
Total Posts: 140
06 Jan 2016 06:16 PM
This, useless Color3.new, thing is not helping at all, and derping. Please lookit over and figure it out. :/

local play = script.Parent --textbutton

play.MouseEnter:connect(function()
play:TweenSize(UDim2.new(0,235,0,35),"Out","Quad",.5,true)--changes box size
play.BackgroundColor3 = Color3.new(245,245,245)--changes box color(changes box color to (62475,62475,62475)
play.TextColor3 = Color3.new(0,0,0)-- changes text color
play.FontSize = Enum.FontSize.Size32--changes size of font
end)
--MouseLeave
play.MouseLeave:connect(function()
play:TweenSize(UDim2.new(0,220,0,30),"In","Quad",.5,true)--changes box size
play.BackgroundColor3 = Color3.new(50,50,50)--doesn't change color back (changes box color to (12750,12750,12750)
play.TextColor3 = Color3.new(255,255,255)--changes font color back
play.FontSize = Enum.FontSize.Size28--changes font size back
end)


Could anyone please fix this, for the children please. I don't know what the heck is wrong with it.
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
06 Jan 2016 06:18 PM
With Color3s you gotta use Color3.new( r/255, g/255, b/255 ) not Color3.new( r, g, b )


Instance.new("BodyThrust",SenseiWarrior).position = CFrame.new(SenseiWarrior,YourGirlsDMs)
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
06 Jan 2016 06:19 PM
Color3 consist of floats from 0 to 1
255 is 1
0 is 0
127 is 0.5
64 is 0.25 ( or so )

so make Color3.new(127,167,120) to Color3.new(127/255,167/255,120/255) for example.
Report Abuse
materking1234 is not online. materking1234
Joined: 20 Nov 2008
Total Posts: 140
06 Jan 2016 06:23 PM
Thanks vlekje513. Any reason why I have to divide 255 on backgroundcolor3 rather than textcolor3?
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
06 Jan 2016 06:33 PM
"Any reason why I have to divide 255 on backgroundcolor3 rather than textcolor3?"

What? Neither of them worked.




Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
06 Jan 2016 06:36 PM
all color3 values on roblox must be in a range of 0-1

its annoying but thats the way it is (especially considering when you use studio's color picker, it gives you a 0-255 range based number)
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