Skip to content

tw.screen

Side: Client

Screen fade utilities for smooth transitions.

Functions

tw.screen.fadeOut(duration?, wait_for_completion?)

Fades the screen to black.

ParameterTypeDefaultDescription
durationinteger?500Fade duration in milliseconds
wait_for_completionboolean?trueIf true, blocks until the fade is complete

tw.screen.fadeIn(duration?, wait_for_completion?)

Fades the screen back in from black.

ParameterTypeDefaultDescription
durationinteger?500Fade duration in milliseconds
wait_for_completionboolean?falseIf true, blocks until the fade is complete

Examples

Fade out, teleport, fade in

lua
-- Fade to black (blocks by default)
tw.screen.fadeOut(800)

-- Screen is now black — do something
SetEntityCoords(PlayerPedId(), vec3(-301.62, 783.04, 117.75))
Wait(500)

-- Fade back in (non-blocking by default)
tw.screen.fadeIn(800)

Quick flash transition

lua
tw.screen.fadeOut(200)
-- instant action
tw.screen.fadeIn(200)

Blocking fade in

lua
tw.screen.fadeOut()
-- ... do something ...
tw.screen.fadeIn(500, true) -- wait for fade in to complete before continuing
print("Screen fully visible again")

Notes

  • fadeOut blocks by default (wait_for_completion = true), so the code after it runs when the screen is fully black.
  • fadeIn does not block by default (wait_for_completion = false), so code continues immediately while the screen fades in.
  • Durations are in milliseconds. Default is 500ms for both functions.

Premium RedM Scripts — Multi-Framework