Screen Effects
The client-side Screen global manages post-processing screen effects (blur, color grading, etc.) with a priority system. Never call AnimpostfxPlay directly — Screen ensures only the highest-priority effect is active at any time.
Applying an Effect
lua
Screen.apply(effectName, priority, opts)lua
Screen.apply('DeathFailMPIn', 10, {})| Parameter | Type | Description |
|---|---|---|
effectName | string | FiveM Animpostfx effect name |
priority | number | Higher number wins when multiple effects compete |
opts | table | Options passed to AnimpostfxPlay (optional) |
Removing an Effect
lua
Screen.remove('DeathFailMPIn')If a lower-priority effect was waiting underneath, it becomes active automatically.
Clearing All Effects
lua
Screen.clear()Priority Guidelines
| Use Case | Suggested Priority |
|---|---|
| Ambient/atmosphere | 1–5 |
| Ability / status effect | 10–20 |
| Cinematic / cutscene | 50 |
| Death / respawn | 100 |
Full Example
lua
-- Apply blur while the player is handcuffed
AddEventHandler('mymodule:handcuffed', function()
Screen.apply('CamPushInNeutral', 15, {})
end)
AddEventHandler('mymodule:uncuffed', function()
Screen.remove('CamPushInNeutral')
end)API Reference
| Method | Description |
|---|---|
Screen.apply(effectName, priority, opts) | Apply a screen effect at the given priority |
Screen.remove(effectName) | Remove a specific screen effect |
Screen.clear() | Remove all active screen effects |
Client-only
Screen is a client-side global. It is not available in server scripts.