Create a blur effect on player?

I have been trying to create a faze effect were the player blurs.
example of game that does it: [UPDATE] The Flash Universe ⚡ - Roblox

When you press f the player blurs, how would I do this?

local BlurEffect = Instance.new("BlurEffect", game.Workspace.CurrentCamera)
local Tweenservice = game:GetService("TweenService")
game:GetService("UserInputService").InputBegan:Connect(function(inp) -- input referring to the input when a new input starts
    if inp.KeyCode == Enum.KeyCode.F then 
        if BlurEffect then 
            Tweenservice:Create(BlurEffect, TweenInfo.new(1), {Size = 20}):Play() --1 is the time you want it to take for the blur to fade in, 20 is the size of the blur   
        end
    end
end)

game:GetService("UserInputService").InputEnded:Connect(function(inp) -- input referring to the input when a new input ends
    if inp.KeyCode == Enum.KeyCode.F then 
        if BlurEffect then 
            Tweenservice:Create(BlurEffect, TweenInfo.new(1), {Size = 0}):Play() --1 is the time you want it to take for the blur to fade in, 0 is the size when there should be no blur
        end
    end
end)

Use snips from this code I just made. You don’t need the tweeting, Just the blur effect and the userinputservice. If you need more help be sure to msg me :slight_smile:

2 Likes

im trying to only blur the player model and not the entire screen.

I don’t understand what you mean

In the game when you press f this happens in that game, as you can see only the player blurs

Screenshot 2023-10-08 124354

I figured it out, all I did was create a depth of feild

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.