Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

If, then situation with script. How do I fix this?

I made a script that if the clock time is at 17.7 in the game. The ambient changes to 176. However, there is an underlined error at: game.Lighting.Ambient. When I join it, the script won't work. I need help.

if game.Lighting.ClockTime == 17.7
then
	game.Lighting.Ambient == 176, 176, 176
end

1 answer

Hi, you cannot just put numbers out of nowhere. You need to define what 176, 176, 176 is. In this case, it is the color of the ambient. So here is the correct script:

if game.Lighting.ClockTime == 17.7 then
	game.Lighting.Ambient = Color3.fromRGB(176, 176, 176)
end

This discussion is preserved as it was. New answers, comments, and votes are closed.