Keyframing the Wiggle expression can be problematic for times when we want to attenuate how much Wiggle we're using. This expression fixes that. (After Effects v2025)
Set up variables in After Effects:
Create a variable by adding the control to your layer: Effects > Expression Controls > Slider Control
Name it "Wiggle Strength"
Add the Wiggle code to the property to control:
In my case, I'm adding this code to the Orientation of a 3D layer. I want to start out with a close-up camera on the object, where having it Wiggle doesn't look good. Once the camera pushes away from the object, I want it to drift ever so slightly in its Orientation (rotation).
// --- Wiggle with Keyframable Strength ---
var freq = .3; // Sets the wiggles per second.
var strength = 0; // Default strength; gets its value from the slider below.
// Links 'strength' to the slider; defaults to 0 on error to prevent breaking.
try {
strength = effect("Wiggle Strength")("Slider");
} catch (e) {}
// Adds wiggle on top of existing keyframes/values.
value + wiggle(freq, strength);