Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a blur effect only affect one person?

Asked by
BIGM_7 4
2 years ago

I am trying to create an object that when you click on blurs your screen for 8 seconds, however when I tested this script with another friend the blur affected him and me when I clicked it. If you can help me that would be most helpful.

local CD = script.Parent.ClickDetector

local function onClicked() local blur = Instance.new("BlurEffect", game.Lighting) wait(8) game.Lighting.Blur:Destroy(10)

end

CD.MouseClick:Connect(onClicked)

0
Make a remote event and use fireclient AProgrammR 398 — 2y

1 answer

Log in to vote
0
Answered by
VitroxVox 884 Moderation Voter
2 years ago
Edited 2 years ago

Hello, I suppose you only want It client-sided right? If you do then you'd need to firstly do It In a localscript and It's the same code essentially just ran localy.

I'm really not sure why you put 10 Inside the Destroy()

local CD = script.Parent.ClickDetector

function onClicked()
    local blur = Instance.new("BlurEffect", game:GetService("Lighting")) 
    wait(8) 
    blur:Destroy()
end

CD.MouseClick:Connect(onClicked)
Ad

Answer this question