SpringShaker
A physics-based camera shaker inspired by @Sleitnick’s RbxCameraShaker, built on a damped harmonic oscillator — giving shakes real weight, momentum, and natural decay.

Download — Documentation – Roblox Marketplace
Purpose
SpringShaker is a high-performance, client-side camera shaker designed to bridge the gap between complex physics and ease of use. Unlike traditional camera shakers that simply scale Perlin noise by a fade envelope, SpringShaker drives each shake through a damped harmonic oscillator — the same math that governs real pendulums and spring systems.
The result is camera motion with genuine mass and resistance: explosions that ring out naturally, earthquakes that swell and bleed off over time, and impacts that feel physically grounded rather than scripted.
This is my first official open-source package release. Proud to share it with both the DevForum and GitHub communities!
How to use?
A sustained earthquake that fades out smoothly after 5 seconds:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SpringShaker = require(ReplicatedStorage.src.SpringShaker)
local Preset = SpringShaker:GetPreset("Earthquake")
SpringShaker:ShakeSustained(Preset)
task.delay(5, function()
SpringShaker:HaltDurationWise(1) -- 1 second smooth fade out
end)
A custom mortar explosion using your own constructor:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SpringShaker = require(ReplicatedStorage.src.SpringShaker)
local mortar = SpringShaker.new({
Magnitude = 5,
Roughness = 5,
FadeInTime = 0,
FadeOutTime = 1.8,
Tension = 122,
Damping = 13,
RotationInfluence = Vector3.new(1.2, 0.5, 0.3),
})
SpringShaker:ShakeOnce(mortar)
Compare this to what other modules require — manual CFrame management and a secondary Heartbeat connection just to prevent camera drift at high FPS:
-- What you'd have to write with other modules
local camCf: CFrame
shake:BindToRenderStep(Shake.NextRenderName(), priority, function(pos, rot, isDone)
camCf = camera.CFrame
camera.CFrame *= CFrame.new(pos) * CFrame.Angles(rot.X, rot.Y, rot.Z)
end)
RunService.Heartbeat:Connect(function()
camera.CFrame = camCf -- required to prevent drift at high FPS
end)
SpringShaker handles render priority, camera application, and drift prevention internally. Nothing to configure.
Installation
From GitHub:
- Download the
.rbxmfile from the latest release - In Roblox Studio, go to File → Import Roblox Model and select the file
- Place it in ReplicatedStorage
From Roblox Marketplace:
- Find SpringShaker in your Toolbox
- Insert it directly into ReplicatedStorage
From Wally:
[dependencies]
SpringShaker = "nilleniumrust/springshaker@1.1.2"
NOTE: SpringShaker is client-only. Do not place it in server-side services such as
ServerScriptServiceorServerStorage.
Physics & Breakdown
The full API documentation is available on the documentation site.
SpringShaker uses a closed-form damped harmonic oscillator:
S(t) = F(t) · cos(√T · t) · e^(−D·t) · E(t)
F(t) — External noise force:
(Pn(rumble) + 0.3 · Pn(jitter)) · Magnitude
cos(√T · t) — Oscillation driven by Tension
e^(−D·t) — Exponential decay driven by Damping (active only during fade-out)
E(t) — Cubic fade envelope:CurrentTime³
The Desmos graph shows how these combine in real time.

Think of it as a pendulum — the player’s camera is the pendulum bob. When F(t) fires, it gives the pendulum a violent push scaled by Roughness. The camera swings back and forth, losing momentum over time due to air resistance (Damping) and gravity (Tension). The result is physically convincing motion with a natural ring-down rather than an abrupt stop.
I highly do not recommend you set Magnitude above
10^5. This risks Resonance — a real physics phenomenon where the forcing frequency matches the system’s natural frequency, producing NaN values that cannot be rendered. SpringShaker detects and aborts this automatically.
Performance
Benchmarked in Play mode using os.clock() wrapping only the update cost — camera application excluded for fairness across all three modules.
SpringShaker — Native vs Non-Native
| Instances | Non-Native Avg | Non-Native Peak | Native Avg | Native Peak |
|---|---|---|---|---|
| 1 | 0.0039ms | 0.0237ms | 0.004ms | 0.015ms |
| 10 | 0.0135ms | 0.0516ms | 0.013ms | 0.056ms |
| 50 | 0.0558ms | 0.2506ms | 0.056ms | 0.134ms |
| 100 | 0.1093ms | 0.1956ms | 0.110ms | 0.161ms |
| 250 | 0.2804ms | 0.6637ms | 0.282ms | 0.422ms |
--!native provides ~25x faster per-call performance and ~28% less peak memory at scale.
Three-way comparison (all with --!native)
| Instances | SpringShaker | RbxCameraShaker | Shake |
|---|---|---|---|
| 1 | 0.0054ms | 0.0062ms | 0.0081ms |
| 10 | 0.0199ms | 0.0159ms | 0.0130ms |
| 50 | 0.0636ms | 0.0518ms | 0.0355ms |
| 100 | 0.1199ms | 0.1032ms | 0.0566ms |
| 250 | 0.2822ms | 0.2385ms | 0.1369ms |
| 1000 | ~1.20ms | ~0.88ms | ~0.51ms |
SpringShaker is the most physics-complete of the three at the cost of being the heaviest per frame. At 10 simultaneous instances — a realistic maximum for most games — total frame cost is under 0.02ms.
Memory at 1000 instances
| Module | Peak | Retained after GC |
|---|---|---|
| SpringShaker | ~2.5MB | ~0KB |
| RbxCameraShaker | ~0.6MB | ~925KB |
| Shake | ~0.6MB | ~0KB |
SpringShaker uses more peak memory due to richer physics state per instance, but releases everything completely on recycle. RbxCameraShaker retains ~925KB after GC consistently.
Presets
| Preset | Description |
|---|---|
| Explosion | Violent initial shock that decays into heavy rumble |
| Landmine | Sharp high-tension sting, stabilizes almost instantly |
| Earthquake | Low-frequency rolling sway — ground liquefying feeling |
| Resonance | Slow rhythmic wobble that builds over time |
| Bounce | Soft fluid recoil with minimal roughness |
| Vibration | Subtle continuous hum |
| ExplosiveBullet | Fast sharp crack of a nearby hit |
| Rumble | Low persistent ground vibration |
| Impact | Sudden blunt force with quick ring-down |

