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: Color3Tween

Previous Thread :: Next Thread 
DarthStrantax is not online. DarthStrantax
Joined: 31 May 2011
Total Posts: 2610
03 Dec 2015 04:48 AM
function Color3Tween(b,c,a)return(function(a)return Color3.new(a.x/255,a.y/255,a.z/255)end)(Vector3.new(b.r*255,b.g*255,b.b*255):lerp(Vector3.new(c.r*255,c.g*255,c.b*255),a))end
Was bored, saw it and remade it more efficient.
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
03 Dec 2015 06:48 AM
lol, no.
Report Abuse
joshuarome is not online. joshuarome
Joined: 29 Aug 2008
Total Posts: 135
03 Dec 2015 10:28 AM
Or:

local C3 = Color3.new

C3Lerp = function(c1,c2,t)
local v = C3(c1.r+(c2.r-c1.r)*t, c1.g+(c2.g-c1.g)*t, c1.b+(c2.b-c1.b)*t)
return v
end

mine > yours
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
03 Dec 2015 12:29 PM
local Color3Lerp do
local Color3_new = Color3.new
Color3Lerp = function(a, b, t)
local _t = 1 - t
return Color3_new(_t*a.r + t*b.r,_t*a.g + t*b.g,_t*a.b + t*b.b)
end
end
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