Hi i have a gui and i want to make the color change, like a rgb and i want it to change the color smoother.
https://gyazo.com/255afc4256959426d73df753e785957b
while true do wait(2) script.Parent.BackgroundColor3=Color3.new(1, 153/255, 102/255) wait(2) script.Parent.BackgroundColor3=Color3.new(0, 102/255,1) wait(2) script.Parent.BackgroundColor3=Color3.new(0, 153/255, 0) wait(2) script.Parent.BackgroundColor3=Color3.new(204/255, 0, 153/255) wait(2) script.Parent.BackgroundColor3=Color3.new(1, 1, 0) wait(2) script.Parent.BackgroundColor3=Color3.new(102/255, 51/255, 0) wait(2) script.Parent.BackgroundColor3=Color3.new(0, 0, 0) wait(2) script.Parent.BackgroundColor3=Color3.new(248/255, 248/255, 248/255) wait(2) script.Parent.BackgroundColor3=Color3.new(119/255, 119/255, 119/255) wait(.5) script.Parent.BackgroundColor3=Color3.new(102/255, 255/255, 204/255) end
Hello. You can use TweenService to help. Try this:
local TweenService = game:GetService("TweenService") local info = TweenInfo.new( 4, -- Time Enum.EasingStyle.Sine, -- EasingStyle Enum.EasingDirection.Out -- EasingDirection ) local propertyTable = {BackgroundColor3 = Color3.new(102/255, 255/255, 204/255)} local tween = TweenService:Create(script.Parent, info, propertyTable) tween:Play()
TweenService:Create()
requires three things. The instance, TweenInfo, and propertyTable.
Please accept and upvote this answer if it helped.