I have attempted to change the outdoor ambient color when a player touches a part and make the color change gradually. The color stays the same as the first color and does not gradually change... any idea why? Nothing in output...
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local Block = game.Lighting
Block.OutdoorAmbient = Color3.new (185, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (182, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (180, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (178, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (176, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (174, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (172, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (170, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (168, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (166, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (164, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (162, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (160, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (158, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (156, 0, 0)
wait(0.1)
Block.OutdoorAmbient = Color3.new (154, 0, 0)
end
end)
