Ready-made tracks
The common moves, ready to drop into an effect: a shake, a kick, a coloured edge, a flash. Pick the ones you want, adjust a few numbers, and you have an effect, without touching primitives or drivers.
Next: primitives & drivers. Ready-made tracks cover the common moves. Building tracks yourself unlocks the rest: moving the camera's position, following live data like health or speed, any curve you can describe, coloured rings and images in the vignette, and effects that react to where a hit came from. Each track below shows what it's Built from, and the Effect builder can write any effect both ways so you can compare.
local Track = MotionFX.Track
MotionFX:Create("Hit", {
Tracks = {
Track.Kick({ Pitch = 4 }),
Track.Shake({ Strength = 1, Release = 0.6 }),
Track.Edge({ Color = Color3.fromRGB(150, 0, 0) }),
Track.Sound(MotionFX.Sounds.Shake),
},
})
MotionFX:Play("Hit")
Every option is optional, so Track.Shake() alone already works. Try values live in the Effect builder.
Tracks that fade
These hit full strength straight away, stay there for Hold seconds (0 by default), then fade out over Release seconds. Set Hold = math.huge to keep one going until you stop the effect.
Track.Shake
functionTrack.Shake(config: ShakeConfig?): RotationTrack
A camera shake that starts at full strength and fades out.
| Option | Type | Default | Description |
|---|---|---|---|
Strength | number? | 1 | Degrees of pitch and yaw. Roll gets twice this. |
Frequency | number? | 16 | How fast it shakes, roughly per second. Low values sway, high values rattle. |
Hold | number? | 0 | Seconds at full strength before fading. math.huge holds until the effect is stopped; it then fades over the effect's FadeOut (or the time passed to Stop) instead of Release. |
Release | number? | 0.6 | Seconds to fade out after the hold. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Shake({ Strength = 2, Hold = 0.3, Release = 1 })
Built from { Primitive = "Rotation", Driver = Drive.Modulate(Drive.Noise(...), Drive.Envelope(...)) }
Track.Kick
functionTrack.Kick(config: KickConfig?): RotationTrack
A jolt that springs back, like a recoil or an impact. With no angles set, it kicks up 3 degrees.
| Option | Type | Default | Description |
|---|---|---|---|
Pitch | number? | 3 | Degrees up. Negative tilts down. |
Yaw | number? | 0 | Degrees to the left. |
Roll | number? | 0 | Degrees of roll. |
Frequency | number? | 7 | How fast it springs back. |
Damping | number? | 0.45 | Below 1 overshoots and wobbles. 1 settles without overshooting. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Kick({ Pitch = 4, Roll = -2 })
Built from { Primitive = "Rotation", Driver = Drive.Spring({ Kick = Vector3.new(pitch, yaw, roll), ... }) }
Track.Punch
functionTrack.Punch(config: PunchConfig?): FOVTrack
A field-of-view punch that springs back. Good for explosions, landings and dashes.
| Option | Type | Default | Description |
|---|---|---|---|
Amount | number? | 6 | Degrees. Positive widens the view, negative zooms in. |
Frequency | number? | 4 | How fast it springs back. |
Damping | number? | 0.4 | Below 1 overshoots and wobbles. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Punch({ Amount = 10 })
Built from { Primitive = "FOV", Driver = Drive.Spring({ Kick = amount, ... }) }
Track.Edge
functionTrack.Edge(config: EdgeConfig?): VignetteTrack
A glow at the screen edge that fades out. Black darkens the edges; a colour makes a hit flash or a status glow.
| Option | Type | Default | Description |
|---|---|---|---|
Color | Color3? | black | The glow's colour. |
Strength | number? | 0.6 | Opacity at the edge, 0 to 1. |
Inset | number? | 0 | Where the glow peaks, 0 to 1. 0 hugs the screen edge; higher values make a ring further in. Edges with different Insets stack, so you can layer a dark edge and a coloured ring. |
Size | number? | 1 | How far it reaches toward the centre. |
Hold | number? | 0 | Seconds at full strength before fading. math.huge holds until the effect is stopped; it then fades over the effect's FadeOut (or the time passed to Stop) instead of Release. |
Release | number? | 0.6 | Seconds to fade out after the hold. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Edge({ Color = Color3.fromRGB(150, 0, 0), Strength = 0.7 })
Built from { Primitive = "Vignette", Driver = Drive.Map(Drive.Envelope(...), function(amount) return { Intensity = ..., Color = ... } end) }
Track.Flash
functionTrack.Flash(config: FlashConfig?): ColorTrack
Brightens the whole screen for a moment, optionally tinted, then fades out.
| Option | Type | Default | Description |
|---|---|---|---|
Brightness | number? | 0.3 | How much brighter, 0 to 1. |
Color | Color3? | none | Tints the flash. |
Hold | number? | 0 | Seconds at full strength before fading. math.huge holds until the effect is stopped; it then fades over the effect's FadeOut (or the time passed to Stop) instead of Release. |
Release | number? | 0.4 | Seconds to fade out after the hold. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Flash({ Brightness = 0.5, Release = 0.2 })
Built from { Primitive = "Color", Driver = Drive.Modulate(Drive.Constant({ Brightness = ... }), Drive.Envelope(...)) }
Track.Blur
functionTrack.Blur(config: BlurConfig?): BlurTrack
A blur that fades out.
| Option | Type | Default | Description |
|---|---|---|---|
Size | number? | 12 | BlurEffect.Size. |
Hold | number? | 0 | Seconds at full strength before fading. math.huge holds until the effect is stopped; it then fades over the effect's FadeOut (or the time passed to Stop) instead of Release. |
Release | number? | 0.6 | Seconds to fade out after the hold. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Blur({ Size = 20, Hold = 0.5, Release = 1.2 })
Built from { Primitive = "Blur", Driver = Drive.Envelope({ Hold = hold, Release = release, ... }, size) }
Tracks that hold
These ease in over Time and, by default, stay until the effect is stopped: keep the handle that Play returns and call handle:Stop(). Set Hold to a number of seconds and they ease back out over Release on their own.
Track.Zoom
functionTrack.Zoom(config: ZoomConfig?): FOVTrack
Eases the field of view and, by default, holds it until the effect is stopped. Good for aiming or charging up. Give it a Hold in seconds to have it ease back on its own.
| Option | Type | Default | Description |
|---|---|---|---|
Amount | number? | -10 | Degrees. Negative zooms in. |
Time | number? | 0.25 | Seconds to ease in. |
Hold | number? | math.huge | Seconds at full strength before fading. math.huge holds until the effect is stopped; it then fades over the effect's FadeOut (or the time passed to Stop) instead of Release. |
Release | number? | 0.25 | Seconds to fade out after the hold. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
MotionFX:Create("Aim", { Tracks = { Track.Zoom({ Amount = -12 }) } })
local aim = MotionFX:Play("Aim")
-- later
aim:Stop(0.2)
Built from { Primitive = "FOV", Driver = Drive.Envelope({ Attack = time, Hold = hold, Release = release }, amount) }
Track.Tint
functionTrack.Tint(config: TintConfig?): ColorTrack
A colour grade that eases in and, by default, holds until the effect is stopped. Good for status effects like poison or stun. Give it a Hold in seconds to have it fade back on its own.
| Option | Type | Default | Description |
|---|---|---|---|
Color | Color3? | none | Tints the screen. |
Saturation | number? | 0 | -1 is grey, positive is more vivid. |
Contrast | number? | 0 | -1 to 1. |
Brightness | number? | 0 | -1 to 1. |
Time | number? | 0.3 | Seconds to ease in. |
Hold | number? | math.huge | Seconds at full strength before fading. math.huge holds until the effect is stopped; it then fades over the effect's FadeOut (or the time passed to Stop) instead of Release. |
Release | number? | 0.3 | Seconds to fade out after the hold. |
Delay | number? | 0 | Seconds after Play before the track starts. |
Weight | number? | 1 | Scale on top of the effect's intensity. |
Track.Tint({ Color = Color3.fromRGB(170, 255, 170), Saturation = -0.3 })
Built from { Primitive = "Color", Driver = Drive.Modulate(Drive.Constant(grade), Drive.Envelope({ Attack = time, Hold = hold, Release = release })) }
Sound
Track.Sound
functionTrack.Sound(soundId: string, config: SoundConfig?): SoundTrack
Plays a sound with the effect. The options are the same as a Sound track's: Volume, PlaybackSpeed, TimePosition, Looped, FadeIn, FadeOut, SoundGroup, plus Delay and Weight.
Track.Sound(MotionFX.Sounds.Shake, { Volume = 0.8 })
Built from { Primitive = "Sound", SoundId = soundId, ... }
Overlay
Track.Overlay
functionTrack.Overlay(sheet: OverlaySheet, config: OverlayConfig?): OverlayTrack
Plays a flipbook of images over the screen, like fire, snow or blood splatter. It fades in, holds (until stopped when looping, for one playthrough when not), then fades out. Use a ready-made sheet from MotionFX.Overlays, or make your own with the Overlay maker. All the options are on the Overlays page.
Track.Overlay(MotionFX.Overlays.SnowOnScreen, { Strength = 0.8 })
Built from { Primitive = "Overlay", Sheet = sheet, Driver = Drive.Envelope(...), ... }