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)

1 comment
You cant just type in numbers for Ambient, OutdoorAmbient and FogColor.. you need to use a Color3.new().