So this is my dictionary for the properties:
local Lighting = game.Lighting
local Button = script.Parent
local Modes = {
[1] = "Summer",
[2] = "Fancy",
[3] = "Performance",
[4] = "Very low",
}
local Properties = {
[1] = {GlobalShadows = true, Technology = Enum.Technology.Future, Ambient = Color3.new(1,0.3,0), OutdoorAmbient = Color3.new(1,0.3,0), ShadowSoftness = 0.2},
[2] = {GlobalShadows = true, Technology = Enum.Technology.Future, Ambient = Color3.new(0.54,0.54,0.54), OutdoorAmbient = Color3.new(0.54,0.54,0.54), ShadowSoftness = 0.2},
[3] = {GlobalShadows = true, Technology = Enum.Technology.ShadowMap, Ambient = Color3.new(0.54,0.54,0.54), OutdoorAmbient = Color3.new(0.54,0.54,0.54), ShadowSoftness = 0.1},
[4] = {GlobalShadows = false, Technology = Enum.Technology.Compatibility, Ambient = Color3.new(0.54,0.54,0.54), OutdoorAmbient = Color3.new(0.54,0.54,0.54), ShadowSoftness = 0},
}
local Index = 2
Button.MouseButton1Click:Connect(function()
if Index < #Modes then
Index += 1
else
Index = 1
end
Button.Text = Modes[Index]
--got stuck at this part about changing the properties
end)
Not every property of Lighting is listed*
Is there like a built-in function to change an item’s properties with a loop?
Any help is appreciated as I’m not as experienced with dictionaries.