Skip to content

Character tuning

CharacterTuning sets every character's walk, air control, turn, step climb and jump launch, and CharacterTuningOverride replaces seven of those values on one character.

World tuning

A place has one CharacterTuning singleton, which scripts read and write through World.Query. A place without it uses the engine defaults in the table below.

The air brake

In the air, a character drives its horizontal velocity toward the target from its move keys plus the speed it took from a moving floor. While a move key is held, MaxAirForce caps the drive; while none is held, AirBrakeForce caps it. The default, 143, stops a character a few ticks after the player lets go, and 0 lets it coast. A character with AirControl uses that component's air strafing instead and never brakes.

CharacterTuningOverride

CharacterTuningOverride on a character replaces these world values for that character only:

Field Default Meaning
MoveP 60 How fast the velocity closes on its target, per second
MaxGroundForce 500 Drive budget on the ground, scaled by the floor's friction
MaxAirForce 143 Drive budget in the air while a move key is held
AirBrakeForce 143 Drive budget in the air while no move key is held
TurnSpeed 16 Turn rate in radians per second
MaxStepHeight 2.45 Tallest step climbed, in units; 0 climbs none
LaunchInfluence 0.95 Share of the floor's velocity kept when leaving it

A new override starts at these defaults, not at the world's values. Removing it puts the character back on the world tuning on the next tick.

-- Server script under scripts/autorun/: characters turn fast and coast in the air.
Component.Character.Added:Connect(function(character: Entity)
    character:Add(Component.CharacterTuningOverride)
    local tuning = character.CharacterTuningOverride
    if tuning then
        tuning.AirBrakeForce = 0
        tuning.TurnSpeed = 32
    end
end)