Hey, so I’ve been working on the lighting of a showcase that I’ve built and I was trying to get the ambient lighting to fade from one value to another once a brick was touched. So far, I’ve managed to get it to just change suddenly but I’m not a scripter and I have no idea how to make it gradually change.
This is what I’ve got so far:
local AmbientChange = false
game.workspace.Detector.Touched:Connect(function(hit)
AmbientChange = true
if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") then
if AmbientChange == true then
game.Lighting.Ambient = Color3.fromRGB(0, 0, 0)
wait (1)
game.Lighting.Ambient = Color3.fromRGB(118, 109, 89)
end
end
end)