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?
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:
local data = script.Parent local reset = false local r = 0 local g = 0 local b = 0 while true do wait(.005) if reset == false then r,g,b = r + 5,g + 5,b + 5 data.BackgroundColor3 = Color3.new(r/255,g/255,b/255) end if r == 255 then reset = true end if reset == true then r,g,b = r - 5,g - 5,b - 5 data.BackgroundColor3 = Color3.new(r/255,g/255,b/255) end if r == 0 then reset = false end end
This goes in a script inside the gui object.
Comment if you need help :P
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.
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?