Heya!
Currently I’m trying to make a black-out system but I came across the issue where I will need to revert the parts color back to its original after the blackout ends.
It’s half finished since I didn’t know what to do after.
Here’s my current code:
local ObjColors = {}
BlackOut.Event:Connect(function(Mode)
if Mode == "START" then
workspace.Audio.BlackOut:Play()
Lights.Parent = Lighting
Remotes.Camera.BumpRemaked:FireAllClients()
FogAtmosphere.Parent = Lighting
TweenService:Create(FogAtmosphere, FogInfo, {Density = 1}):Play()
for _, physicalLight in pairs(PhysicalLights:GetChildren()) do
table.insert(ObjColors, physicalLight.Color)
local Tween = TweenService:Create(physicalLight, info, {Color = Color3.fromRGB(0,0,0)})
Tween:Play()
end
elseif Mode == "END" then
workspace.Audio.LightsOn:Play()
Lights.Parent = workspace:WaitForChild("Map")
Remotes.Camera.BumpRemaked:FireAllClients()
local TE = TweenService:Create(FogAtmosphere, FogInfo, {Density = 0})
TE:Play()
TE.Completed:Wait()
FogAtmosphere.Parent = ReplicatedStorage
for _, physicalLight in pairs(PhysicalLights:GetChildren()) do
local ColorToGet = table.find()
local Tween = TweenService:Create(physicalLight, info, {Color = --part where i get the colour back but don't know how})
Tween:Play()
end
end
end)