Blur Effect
LocalScript (StarterPlayerScripts)
LocalScript (StarterPlayerScripts)
local part = game.Workspace.Part
local function onPartTouch(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
local blur = Instance.new("BlurEffect")
blur.Parent = game.Workspace.CurrentCamera
blur.Size = 25
end
end
local function onTouchEnd()
game.Workspace.CurrentCamera.Blur:Destroy()
end
part.Touched:Connect(onPartTouch)
part.TouchEnded:Connect(onTouchEnd)