Make a camera shaking

  1. What do you want to achieve?
    Hello, so i want like a camera shaking system, a value that when it’s higher the shaking is more intense. (The shaking need to be smooth)

  2. What is the issue?
    I don’t know how to make it.

  3. What solutions have you tried so far?
    I looked everywhere and i didn’t find anything.

1 Like

Hello! If you want a quick solution a similar module already exists, check EZ camera shake.

Yes i used that by the past but i stopped because you need to make events to shake.

You can achieved this like this:

local runService = (game:GetService("RunService"));

local camera = (workspace.CurrentCamera);

local AMPLITUDE = (0.25);
local FREQUENCY = (10);
function RenderStep(dt)
	camera.CFrame = camera.CFrame * CFrame.Angles(math.cos(tick() * FREQUENCY) * math.rad(AMPLITUDE), math.sin(tick() * FREQUENCY) * math.rad(AMPLITUDE), 0)
end;

runService.RenderStepped:Connect(RenderStep)

Tested it and it was perfect.