Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Smooth Color Changing? [closed]

Asked by 9 years ago

Heya Guys! I have noticed in games in such when a Surface Gui/Brick Changes color it does it smoothly, what aspect in scripting is that?

Closed as Not Constructive by M39a9am3R, Tigerism, ChemicalHex, and User#5978

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 9 years ago

You can do all sorts of things. I'll give you some code I used recently to make a TextButton's BackgroundColor change from black to white:

01local data = script.Parent
02local reset = false
03local r = 0
04local g = 0
05local b = 0
06 
07while true do
08    wait(.005)
09    if reset == false then
10        r,g,b = r + 5,g + 5,b + 5
11        data.BackgroundColor3 = Color3.new(r/255,g/255,b/255)
12    end
13    if r == 255 then
14        reset = true
15    end
View all 23 lines...

This goes in a script inside the gui object.

Comment if you need help :P

Ad
Log in to vote
-2
Answered by 9 years ago

Well you can try all different types of function for that like, -while true do -for i -etc.. Try looking on the ROBLOX Wiki up vote and accept if this helped.