Hello developers! I was bored this morning and decided to try to make a motion blur script. Not only does this one work well, it’s also more compact that most other motion blur scripts on the toolbox.
How to use
First off, make sure you have inserted a blur effect into lighting. Next, find
StarterPlayerScripts and insert a local script. Finally, paste in the code below.
local lv = Vector3.zero game:GetService("RunService").RenderStepped:Connect(function() local x,y,z = game.Workspace.CurrentCamera.CFrame:ToEulerAnglesXYZ() x,y,z = math.deg(x),math.deg(y),math.deg(z) game.Lighting.Blur.Size = math.clamp((Vector3.new(x,y,z)-lv).Magnitude/2,2,10) lv = Vector3.new(x,y,z) end)
How it works
It works by comparing the rotation of the camera from the last frame to the current one and scaling the blur effect’s size accordingly.
In all, it works. Tbh, it literally took me like 15 minutes to write this script but I hope this helps someone. Thank you for your time!