This script inside a block makes things go blurry when stepped on, but idk how to turn it off after stepping on again!
local part = script.Parent local function onPartTouched(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then game.Lighting.Blur.Size = 56 end end part.Touched:Connect(onPartTouched) local function onPartTouchedagain(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then game.Lighting.Blur.Size = 0 end end part.Touchedagain:Connect(onPartTouchedagain)
(yes i purposuely made the second part super bad to get u to fix lol)
it will detect when it is blurred then if it is it will make it unblur
local part = script.Parent part.Touched:Connect(function(hit) local partParent = hit.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then if game.Lighting.Blur.Size = 56 game.Lighting.Blur.Size = 0 else game.Lighting.Blur.Size = 56 end end)
But you should probably add debounce since touched can register many times in seconds
local part = script.Parent local isFirstTime = true local function onPartTouched(otherPart) local partParent = otherPart.Parent local humanoid = partParent:FindFirstChildWhichIsA("Humanoid") if humanoid then if isFirstTime then game.Lighting.Blur.Size = 56 isFirstTime = false else game.Lighting.Blur.Size = 0 end end end part.Touched:Connect(onPartTouched)