Changing Lightning via Touching a Part

Hello, there… I have encountered a problem where the BlurEffect size isn’t changing after the player touched a part where it supposed to change the size of the Blur. No errors are popping up in Output. Is there something i’m doing wrong?

Here is the code:

local function onTouched(part)
	    local h =part.Parent:FindFirstChild("Humanoid")
	    local blur =game.Lighting
	    if h then
	        blur = 0
	end
end

script.Parent.Touched:connect(onTouched)
1 Like

You are saying:

local Blur = game.Lighting
--instead of
local Blue = game.Lighting.BlurEffect--I forgot what is is called.

You are also just saying:

 blur = 0
--instead of
 blur.Size = 0

I also suggest you have the Blur variable stored above the touched event.

2 Likes

I tried that but it said:

00:02:19.273 - BlurEffect is not a valid member of Lighting

What is the name of the blur effect in lighting send a picture.

Screenshot (60)

Then you have to reference it correctly

1 Like

Oh, there we go… It works perfectly fine now…, Thank you so much, you have been a great help today! :smiley:

1 Like