- Documentation
- Server functions
- setVehicleHealthFloor
Function
setVehicleHealthFloor
New function!Added to Trilogy Hub on 2 Nov 2026.
Sets a vehicle health floor: bullets, fire, explosions and collisions will not take the health below this value. A floor of 250 or more stops the car from catching fire or exploding from damage. A script can still go lower with setElementHealth or blowVehicle. 0 turns the floor off.
Syntax
bool setVehicleHealthFloor(vehicle vehicle, number health)Arguments
vehiclevehicle- The vehicle.
healthnumber- Health floor 0-1000.
Returns
true on success.
Example
local vehicle = createVehicle(411, 2000, -1690, 13.5)
setVehicleHealthFloor(vehicle, 300)
See also
getVehicleHealthFloorReturns the vehicle health floor set by setVehicleHealthFloor (0 = no floor).setVehicleProofsSets what a vehicle is immune to: bullets, fire, explosions, collisions and melee. Works for every player. Allfalserestores normal behaviour. setVehicleDamageProof also makes it immune to everything at once.