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: How to Lerp Color3s?

Previous Thread :: Next Thread 
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 01:40 PM
This is terribly wrong and I don't know why lol
I've never lerped!11

while wait() do
local newColor = (filtered Color3.new here)
local tint = game.Lighting.ColorCorrection.TintColor
if tint ~= newColor then
tint:lerp(newColor,1)
else
break
end
end


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 01:45 PM
how do lerp?!


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 01:50 PM
bump


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
25 Feb 2017 01:53 PM
while wait() do
local newColor = (filtered Color3.new here)
local tint = game.Lighting.ColorCorrection.TintColor
if tint ~= newColor then
tint:lerp(newColor, Color3.new(1,1,1))
else
break
end
end

help i am trapped in this weird box with text
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 01:54 PM
ah, that's how it works
tyvm


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
HalfPinky456 is not online. HalfPinky456
Joined: 10 Apr 2011
Total Posts: 6236
25 Feb 2017 01:57 PM
yw

help i am trapped in this weird box with text
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:00 PM
That doesn't work?


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:02 PM
I mean at least now it does a thing but while wait() do local newColor = ############### #### #### local tint = game.Lighting.ColorCorrection.TintColor if tint ~= newColor then tint:lerp(newColor,Color3.new(1,1,1)) print(tint) else break end end it prints "0.988235, 0.988235, 0.98823" infinitely r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:02 PM
I mean at least now it does a thing but

while wait() do
local newColor = (again a Color3.new)
local tint = game.Lighting.ColorCorrection.TintColor
if tint ~= newColor then
tint:lerp(newColor,Color3.new(1,1,1))
print(tint)
else
break
end
end

it prints "0.988235, 0.988235, 0.98823" infinitely


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
25 Feb 2017 02:05 PM
The lerp methods don't mutate the object. They return a new one.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
25 Feb 2017 02:06 PM
It works just like any other linear interpolation. The first argument of Color3:lerp() is the goal, and the second argument is the alpha (0-1)


Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:07 PM
yeah and also color3's apparently between 0 and 1 not 1 and 255


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
25 Feb 2017 02:14 PM
for i = 0,1,0.1 do
wait()
textlabel.TextColor3 = textlabel.TextColor3:lerp(Color3.fromRGB(27, 42, 53), i)
end


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow me on twitch: twitch.tv/austinrblx
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:20 PM
none of this is working lol


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
25 Feb 2017 02:25 PM
local oldColor = Color3.fromRGB(0,0,0)
local destination - Color3.fromRGB(150,150,150)

for i = 0,1,1/steps do
someGui.ColorOrWhatever = oldColor:lerp(destination,i)
wait()
end


Report Abuse
Wrathsong is online. Wrathsong
Joined: 05 Jul 2012
Total Posts: 22393
25 Feb 2017 02:29 PM
my code works but you have to change it to suit your needs


Ever wanted to learn how to script? Check out my YouTube channel: youtube.com/austintheslayer Want to see me code in action? Follow me on twitch: twitch.tv/austinrblx
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:30 PM
That's exactly what I have atm and it's not changing!


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:31 PM
here's what I have

for i=0,1,1/100 do
local newColor = Color3.fromRGB(208,208,252)
local tint = game.Lighting.ColorCorrection.TintColor
if tint ~= newColor then
tint = tint:lerp(newColor,i)
print(tint)
else
break
end
end


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
Violicx is not online. Violicx
Joined: 02 Feb 2017
Total Posts: 18
25 Feb 2017 02:37 PM
local function c3(r,g,b)
return Color3.new(r/255,g/255,b/255)
end

local a=c3(255,255,255)
local b=c3(0,0,0)

for i=0,1,.1 do
script.Parent.BackgroundColor3=a:Lerp(b,i)
wait()
end


Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:39 PM
viol I don't see how that helps me at all lol


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
Violicx is not online. Violicx
Joined: 02 Feb 2017
Total Posts: 18
25 Feb 2017 02:41 PM
you asked how to lerp colors and that's how you ## ## dont give me that
Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:43 PM
I somewhat know how to lerp colors now but none of the things people have posted are working.

when I print out the TintColor it's changing but it stays at 255/255/255 in studio and never changes visually


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
Violicx is not online. Violicx
Joined: 02 Feb 2017
Total Posts: 18
25 Feb 2017 02:44 PM
What I posted works


Report Abuse
microk is not online. microk
Joined: 19 Oct 2011
Total Posts: 32496
25 Feb 2017 02:44 PM
read my reply above what you posted, it's essentially the same thing


r+://465944000r+://465943930r+://465943832r+://465943273
Report Abuse
Violicx is not online. Violicx
Joined: 02 Feb 2017
Total Posts: 18
25 Feb 2017 02:46 PM
Yeah but that doesn't work


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