|
| 26 Jul 2016 01:35 PM |
Right now in my PointLight The color changes, but it isnt smooth. It just changes to another color after .5 seconds of a wait.
Can anyone give me a color change script that will make the color change smooth like this > https://youtu.be/E9s1ltPGQOo?t=24s
|
|
|
| Report Abuse |
|
|
| |
|
DeGames
|
  |
| Joined: 08 Sep 2012 |
| Total Posts: 1028 |
|
|
| 26 Jul 2016 01:44 PM |
something like this will turn the color from green to yellow to red
when i is 0 it is green
for i = 1, 226, 1 do script.Parent.PointLight.Color = Color3.new(i, 226, 0)--(color,brightness,saturation)
wait(.05) end |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Jul 2016 01:46 PM |
I don't think that's what he's looking for,
Picture RGB as a circle, then make a circle concentric circle inside of it, and then follow the circumference of that circle around in a loop, forever.
I think using that representation you could produce the desired effect but I don't know anything about sin cos and tan
|
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Jul 2016 01:49 PM |
theres a lerp function for rgb i think, its on the devforum
#code --[[ hi friends i like turtles ]]-- |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Jul 2016 01:49 PM |
If you're using his script you still have to divide all of those by 255
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Jul 2016 01:50 PM |
I don't think he's looking for lerp either, Derp, unless he wants to lerp between 0 and 255 for r, g, or b, and that would be a triangle, not a circle
|
|
|
| Report Abuse |
|
|
casperm8
|
  |
| Joined: 15 Sep 2008 |
| Total Posts: 425 |
|
| |
|
ISHOOTPPL
|
  |
| Joined: 06 Dec 2014 |
| Total Posts: 109 |
|
|
| 26 Jul 2016 02:14 PM |
https://www.roblox.com/games/411411079/Tweening-color-screw-around
This is amazing and I use it |
|
|
| Report Abuse |
|
|
ISHOOTPPL
|
  |
| Joined: 06 Dec 2014 |
| Total Posts: 109 |
|
|
| 26 Jul 2016 02:16 PM |
| @DeGames Color3.new() Is [Red value, Green Value, Blue Value] Pass 0 = 0 pass 1 = 255 anything over 1 will be timesed by 255 |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 02:17 PM |
while true do for Colour = 1, 255 do local NewColour = Color3.new(1, Colour / 255, 0) Frame.BackgroundColor3 = NewColour wait() end for Colour = 1, 255 do local NewColour = Color3.new(1 - (Colour / 255), 1, 0) Frame.BackgroundColor3 = NewColour wait() end for Colour = 1, 255 do local NewColour = Color3.new(0, 1, Colour / 255) Frame.BackgroundColor3 = NewColour wait() end for Colour = 1, 255 do local NewColour = Color3.new(0, 1 - (Colour / 255), 1) Frame.BackgroundColor3 = NewColour wait() end for Colour = 1, 255 do local NewColour = Color3.new(Colour / 255, 0, 1) Frame.BackgroundColor3 = NewColour wait() end for Colour = 1, 255 do local NewColour = Color3.new(1, 0, 1 - (Colour / 255)) Frame.BackgroundColor3 = NewColour wait() end end
( ͡• ◡ ͡•) -=[ RAP: 362,303 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•) |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Jul 2016 02:18 PM |
^ I feel like there's a much easier way to do this
|
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 02:19 PM |
Probably with a math function of course, but I don't know math. xddddddd
( ͡• ◡ ͡•) -=[ RAP: 362,303 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•) |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 26 Jul 2016 02:22 PM |
I feel you What do you think about the trig approach and just tracing the circumference of a circle concentric to the center of the RGB chart, with a radius of ~178/255?
|
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 02:23 PM |
That would probably be more easier/shorter. I'll look into this and I'll get back to you.
( ͡• ◡ ͡•) -=[ RAP: 361,639 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•) |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 02:33 PM |
Who am I kidding, I can't do this. Math in Lua is far beyond my knowledge.
( ͡• ◡ ͡•) -=[ RAP: 361,655 || DurstAuric; the narb of ROBLOX ]=- ( ͡• ◡ ͡•) |
|
|
| Report Abuse |
|
|
|
| 26 Jul 2016 04:58 PM |
Well still got not help :(
|
|
|
| Report Abuse |
|
|