I made this script to simulate a lightning effect, The atmosphere color would turn white for around 2 seconds at random every 8 seconds, but i keep getting the error "Script:9: attempt to call a table value
My original script
Loop = true
while Loop == true do
wait (8)
local RandomNumber = math.random (1,2)
print (RandomNumber)
if RandomNumber == 2 then
Lightning = true
if Lightning == true then
game.Lighting.Atmosphere.Color = Color3(255,255,255)
wait (2)
game.Lighting.Atmosphere.Color = Color3(88, 98, 122)
Lightning = false
end
end
end
Ive Tried ,
game.Lighting.Atmosphere.Color = Enum.Color3.new(1,1,1)
wait (2)
game.Lighting.Atmosphere.Color = Enum.Color3.new(0.345098, 0.384314, 0.478431)

1 comment
replace Color3 with Color3.new