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

Any way to blur a players vision as they get closer to a certain point?

I believe it would use the lighting object filter, labeled BlurEffect, but I have no clue how to do this.

1 answer

✓ Accepted answer

In a LocalScript in the player:

local plr = game.Players.LocalPlayer

local certainpoint = workspace:WaitForChild("POINTPARTNAME").Position
local BlurEffect = Instance.new("BlurEffect", game.Lighting)

game:GetService("RunService").RenderStepped:connect(function()
	local distance = plr:DistanceFromCharacter(certainpoint)+1 -- dividing by 0 is not possible :p
	BlurEffect.Size = 100/distance
end)

The closer your player gets the bigger the blur gets, when the player is really near (like 2 studs) the effect's size will be big. Around 40 is a size that gives a nice effect.

You need to modify the "BlurEffect.Size" line a bit to what you need

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