anyone know why? im trying to make a script where after 12 seconds has been elapsed, it takes a total of 1 second for the transition between colors for the decal.
local decal = game.Workspace.Monster1.Decal
local startColor = Color3.new(170/255, 170/255, 170/255)
local endColor = Color3.new(30/255, 30/255, 30/255)
local transitionTime = 1 -- Transition time in seconds
local totalTime = 12 -- Total time in seconds
local startTime = tick()
while tick() - startTime < totalTime do
local elapsedTime = tick() - startTime
local progress = math.clamp(elapsedTime / transitionTime, 0, 1)
local lerpedColor = startColor:Lerp(endColor, progress)
decal.Color3 = lerpedColor
wait()
end
decal.Color3 = endColor
** You are now Level 5! **