Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

These two simple codes don't work?

So... analyze these two simple scripts here:

lighting = game:GetService("Lighting")
lighting.Blur.Size = 24 -- blur actually changes


lighting = game:GetService("Lighting")
blursize = lighting.Blur.Size

blursize = 24 -- blur does not change

Any idea why the former one works but the latter one doesn't? Thanks.

6 comments

1

The second code sets to what the value's number is, while the first is set up for the blur object itself.

0

@TheeDeathCaster How did you know :O?

0

@TheeDeathCaster can you clarify that a little bit? I am struggling to understand

0

So when you say: lighting.Blur.Size = 24, you are setting it's value; as opposed to when you say blurSize = lighting.Blur.Size, you are not making a shortcut to the blur's size, rather, your blurSize is just the number 24.

0

It's like saying local y = 7 .... y = 28 <--Rewrites the variable for the second code, while the first one changes the value itself instead of rewriting the variable. Think of the second code similar to this: http://wiki.roblox.com/index.php?title=Variable#Swapping

0

I see. Thanks guys!

1 answer

try putting a local script into lighting and put local before

ex

local lighting = game:GetService('Lighting') local blur = lighting.blur.size OR

local blur = game.lighting.blur.size blur = 24

OR just change properties

if you cant do the script in lighting i guess you have to deal with it i ran into this problem as well

This discussion is preserved as it was. New answers, comments, and votes are closed.