Skip to content

Transitions ​

The client-side Transitions global provides screen fade and cinematic letterbox effects. Use it instead of raw DoScreenFadeOut / DoScreenFadeIn calls to keep transitions consistent across modules.

Fade Out ​

lua
Transitions.fadeOut(duration)

Fades the screen to black over duration milliseconds. The function returns immediately — it does not yield.

lua
Transitions.fadeOut(500)
Wait(500)
-- do the thing (teleport, load, etc.)

Fade In ​

lua
Transitions.fadeIn(duration)

Fades from black back to the game view over duration milliseconds.

Cinematic Bars ​

lua
Transitions.cinematic(state)

Shows or hides the letterbox (top/bottom black bars) used for cutscene-style sequences.

lua
Transitions.cinematic(true)   -- show bars
Transitions.cinematic(false)  -- hide bars

Full Example — Teleport with Fade ​

lua
local function teleportPlayer(coords)
    Transitions.fadeOut(500)
    Wait(600)

    SetEntityCoords(PlayerPedId(), coords.x, coords.y, coords.z)

    Wait(100)
    Transitions.fadeIn(500)
end

Full Example — Cutscene ​

lua
local function playCutscene()
    Transitions.cinematic(true)
    Transitions.fadeIn(300)

    -- ... play cutscene logic ...

    Transitions.fadeOut(300)
    Wait(400)
    Transitions.cinematic(false)
    Transitions.fadeIn(300)
end

API Reference ​

MethodDescription
Transitions.fadeOut(duration)Fade screen to black over duration ms
Transitions.fadeIn(duration)Fade screen in from black over duration ms
Transitions.cinematic(state)Show (true) or hide (false) letterbox bars

Client-only

Transitions is a client-side global. It is not available in server scripts.

See Also ​

Released under the MIT License.