Hello! I’m currently trying to make a script that would animate the Atmosphere & the Lightning to match the dictionary named “newAtmosphere”. However, no matter what I do, it seems to give me an error about a property not being the property of the given object even though it literally is (for example, decay not being the property of Atmosphere)? I’m not really familiar with tween stuff, even scripting in general so any kind of help would matter a lot to me.
I’ve tried changing the Atmosphere with Lightning, I’ve tried deleting the properties in the dictionaries that could not have been the properties of the actual object but none of them worked so I’m really confused.
local newAtmosphereColor = Atmosphere.Color == Color3.new(0, 0, 0)
local newAtmosphereDecay = Atmosphere.Decay == Color3.new(0, 0, 0)
local newAmbient = game.Lighting.Ambient == Color3.new(0, 0, 0)
local newOutdoorAmbient = game.Lighting.OutdoorAmbient == Color3.new(0, 0, 0)
local newBrightness = game.Lighting.Brightness == 10
local newGlare = game.Lighting.Atmosphere.Glare == 0
^ these are the variables that I wrote in the “newAtmosphere” dictionary.
local defaultAtmosphere = {
color = Atmosphere.Color,
decay = Atmosphere.Decay,
glare = Atmosphere.Glare,
brightness = game.Lighting.Brightness,
ambient = game.Lighting.Ambient,
outdoorAmbient = game.Lighting.OutdoorAmbient
}
local newAtmosphere = {
color = newAtmosphereColor,
decay = newAtmosphereDecay,
glare = newGlare,
brightness = newBrightness,
ambient = newAmbient,
outdoorAmbient = newOutdoorAmbient
}
local transition = TweenService:Create(Atmosphere, TweenInfo.new(10), newAtmosphere)
transition:Play()
^ This is the code itself.
TweenService:Create no property named 'ambient' for object 'Atmosphere'
^ This is one of the examples that Studio gives as an error, I know that ‘Ambient’ is not a property of ‘Atmosphere’ but it happens to any property, including ‘Decay’, ‘Glare’, etc.
I would be glad to know what may be causing this but I also would accept the recommendations about what other ways I could simply animate atmosphere / lightning. Again, I’m really bad at scripting so I would want it to be as simple as possible.