So I'm trying to make it so when I chat a certain number, it changes the lighting, but when I do it does nothing. I know the script works, it's just this part:
game.Lighting.Ambient = 169, 164, 155 game.Lighting.Brightness = 2 game.Lighting.OutdoorAmbient = 169, 151, 43 game.Lighting.ShadowSoftness = 0.5 game.Lighting.ClockTime = -16.001 game.Lighting.GeographicLatitude = 52.692 game.Lighting.FogColor = 121, 75, 35
Full Script if you Need it:
function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "/e 123984398450954") then game.Lighting.Ambient = 169, 164, 155 game.Lighting.Brightness = 2 game.Lighting.OutdoorAmbient = 169, 151, 43 game.Lighting.ShadowSoftness = 0.5 game.Lighting.ClockTime = -16.001 game.Lighting.GeographicLatitude = 52.692 game.Lighting.FogColor = 121, 75, 35 end end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
Alright so the main issue I see is you aren't using Color3.new() and Clock time only goes to the nearest hour such as between 1 & 24. Here's a video ROBLOX did to explain TimeOfDay. I'd recommend watching it so you understand more of it.
function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "/e 123984398450954") then game.Lighting.Ambient = Color3.new(169, 164, 155) game.Lighting.Brightness = 2 game.Lighting.OutdoorAmbient = Color3.new(169, 151, 43) game.Lighting.ShadowSoftness = 0.5 game.Lighting.ClockTime = 16 game.Lighting.GeographicLatitude = 52.692 game.Lighting.FogColor = Color3.new.(121, 75, 35) game.Lighting.FogEnd = 1500 end end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
Tell me if this works, apologies.. on my phone right now so I can't test it.