#how do i copy a lighting property without it updating

1 messages · Page 1 of 1 (latest)

wanton talon
#

i am attempting to copy the value of lighting properties (for example brightness), as a constant value, however whenever the value is read from it updates to the current value

yes it is a variable, i have tried table.freeze, tostring(), tonumber(), converting it to an instance value, but none have worked
local basebrightness = game.Lighting.Brightness

wanton talon
daring dome
#

of corse it won't work

wanton talon
#

example script of what i was trying to achieve (ignore the capitalization its just to show an example)

local basebrightness = game.lighting.brightness

while task.wait(30) do
game.lighting.brightness = 0
task.wait(10)
game.lighting.brightness = basebrightness
end

daring dome
#
local basebrightness = game.lighting.brightness

while task.wait(30) do
game.lighting.brightness = 0
task.wait(10)
game.lighting.brightness = basebrightness
end
#

this should work

#

unless you keep updating basebrightness

#

which you aren't doing

wanton talon
spare ruinBOT
#

studio** You are now Level 2! **studio