How do I change it so before the part changes color I want the transparency to tweenservice to 0.5 where it fades in and out then when the transparency is done changing to 0.5, to 0 i want the part to change the color
local part = script.Parent
local tweenInfoColor = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0)
while wait(3.5) do
local randomColor = Color3.fromRGB( math.random(1, 255), math.random(1, 255), math.random(1, 255) )
local Transparency = 0.5
--Dancefloor--
local tween = TweenService:Create(workspace.DanceFloor.DanceTile, tweenInfoColor, {Color = randomColor, Transparency = Transparency})
tween:Play()
--Stair 1
for i, Part in pairs(workspace.Stair1.Light:GetChildren()) do
local StairTween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor, Transparency = Transparency })
StairTween:Play()
end
--Stair 2 Ended-
for i, Part in pairs(workspace.Stair2.Light:GetChildren()) do
local StairTween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor, Transparency = Transparency })
StairTween:Play()
end
--Stair 3 Ended--
for i, Part in pairs(workspace.Stair3.Light:GetChildren()) do
local StairTween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor })
StairTween:Play()
end
--Stair 4 Ended--
for i, Part in pairs(workspace.Stair4.Light:GetChildren()) do
local StairTween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor })
StairTween:Play()
end
--Ramps--- Light(Ye)
for i, Part in pairs(workspace.Ramp1:GetChildren()) do
local Ramp1Tween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor })
Ramp1Tween:Play()
end
for i, Part in pairs(workspace.Ramp2:GetChildren()) do
local Ramp2Tween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor })
Ramp2Tween:Play()
end
---Rooff---
--Statue
for i, Part in pairs(workspace.Statue.LightUp:GetChildren()) do
local StatueTween = TweenService:Create(Part, tweenInfoColor, {Color = randomColor })
StatueTween:Play()
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------- Lights ---------------------------------------------------------------------------------
local tween = TweenService:Create(workspace.DanceFloor.Lights.DanceLight.SurfaceLight, tweenInfoColor, {Color = randomColor })
tween:Play()
end