client
SetPedComponentVariation
FiveM client native documentation with a Lua example.
Summary
Changes a ped's clothing/appearance component (torso, legs, etc.). The core native behind clothing and character-customization scripts.
Returns
void
Parameters
pednumberThe ped to modify.componentIdnumberThe component slot (e.g. 11 = torso, 4 = legs).drawableIdnumberThe drawable index.textureIdnumberThe texture variation.paletteIdnumberPalette (usually 0 or 2).Example
local ped = PlayerPedId()
SetPedComponentVariation(ped, 11, 5, 0, 0) -- torso drawable 5Common pitfalls
- Valid drawable/texture ranges depend on the ped model — out-of-range values show as invisible or default.
- Use GetNumberOfPedDrawableVariations to stay within valid ranges.
Related natives
Related guides
FiveM scripts done right
Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.
Browse Scripts →