How to enable blur when humanoid gets near

Hi all
I am making a horror game in which when the antagonist gets 10 studs near the blur effect is enabled
How do i achive that

1 Like
local magnitude = (workspace.Part1.Position - workspace.Part2.Position).Magnitude
if magnitude <= 10 then
---do a thing
end
local Player = game.Players.LocalPlayer
local Object = game.Workspace.Part -- Example

if Player:DistanceFromCharacter(Object.Position) <= 10  then
	print("yes")
end