How to make a smooth transition of the Part color from white to black?

how to make a smooth transition of the Part color from white to black

You can use TweenService to tween the Color3 numbers on your part.

local TS = game:GetService("TweenService")
local part = game.Workspace.YourPart -- replace 'YourPart' with your desired part
local info = TweenInfo.new(Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local goal = {}
goal.Color3 = Color3.new(0, 0, 0)

local Tween = TS:Create(part, info, goal)
Tween:Play()
local tweens = game:GetService("TweenService")

local part = workspace.Part
part.Color = Color3.new(1, 1, 1) --White.

task.wait(5)

local tween = tweens:Create(part, TweenInfo.new(1), {Color = Color3.new(1, 1, 1)}) --Black
tween:Play()

Server script placed inside a BasePart instance.