Skip to content

Settings

System · Settings · server and client scripts

Settings reads the player's keybinds and device settings from the client settings menu, and reports when the core menu opens or closes. To read keys, mouse buttons and the cursor, use Input.

The Diagnostics setting shows the FPS, draws, ping and network card in the bottom right corner. It is off for a player who never chose it. Studio and the playtest clients it starts show it unless settings.cfg has a saved show_fps. A client saves show_fps only after the player changes the setting, so a default is never written to settings.cfg.

Device

Quality

PropertyClient onlyRead only
Quality: number

Quality is the graphics quality level from 1 to 10.

Default 5

Errors (1)
Error When
Quality can only be written from a client script Written from a server script.

Fullscreen

PropertyClient onlyRead only
Fullscreen: boolean

Fullscreen is true when the client window runs in fullscreen mode.

Default false

Errors (1)
Error When
Fullscreen can only be written from a client script Written from a server script.

VerticalSync

PropertyClient onlyRead only
VerticalSync: boolean

VerticalSync is true when vertical synchronization is active.

Default true

Errors (1)
Error When
VerticalSync can only be written from a client script Written from a server script.

FieldOfView

PropertyClient onlyRead only
FieldOfView: number

FieldOfView is the vertical camera field of view in degrees.

Default 70

Errors (1)
Error When
FieldOfView can only be written from a client script Written from a server script.

Sensitivity

PropertyClient onlyRead only
Sensitivity: number

Sensitivity is the player's camera look multiplier where 1 is 100 percent.

Default 1

Errors (1)
Error When
Sensitivity can only be written from a client script Written from a server script.

ShiftLock

PropertyClient onlyRead only
ShiftLock: boolean

ShiftLock is whether the player allows shift-lock in the settings menu. The engine does not lock the cursor itself; a control script checks this setting before locking the cursor.

Default false

Example

-- Client script.
function Update(dt: number)
    -- lock the cursor when Shift is pressed, if the player allows it
    if Settings.ShiftLock and Input.WasPressed("LeftShift") then
        Input.MouseBehavior = "LockCenter"
        Input.RotationType = "CameraRelative"
    end
end
Errors (1)
Error When
ShiftLock can only be written from a client script Written from a server script.

UiScale

PropertyClient onlyRead only
UiScale: number

UiScale is the interface scaling multiplier chosen by the player.

Default 1

Errors (1)
Error When
UiScale can only be written from a client script Written from a server script.

Diagnostics

PropertyClient onlyRead only
Diagnostics: boolean

Diagnostics is true when the performance and network diagnostics overlay is visible.

Default false

Errors (1)
Error When
Diagnostics can only be written from a client script Written from a server script.

AaMethod

PropertyClient onlyRead only
AaMethod: "Off" | "SMAA" | "MSAA"

AaMethod is the active anti-aliasing method: "Off", "SMAA", or "MSAA".

Default "SMAA"

Errors (1)
Error When
AaMethod can only be written from a client script Written from a server script.

AaQuality

PropertyClient onlyRead only
AaQuality: "Low" | "Medium" | "High" | "Ultra" | "2x" | "4x" | "8x"

AaQuality is the anti-aliasing quality tier or sample count: "Low", "Medium", "High", "Ultra", "2x", "4x", or "8x".

Default "High"

Errors (1)
Error When
AaQuality can only be written from a client script Written from a server script.

Bloom

PropertyClient onlyRead only
Bloom: boolean

Bloom is true when post-processing bloom is turned on.

Default true

Errors (1)
Error When
Bloom can only be written from a client script Written from a server script.

Saturation

PropertyClient onlyRead only
Saturation: number

Saturation is the post-processing color saturation multiplier.

Default 1

Errors (1)
Error When
Saturation can only be written from a client script Written from a server script.

Nametags

PropertyClient onlyRead only
Nametags: boolean

Nametags is true when player nametags are shown overhead.

Default true

Errors (1)
Error When
Nametags can only be written from a client script Written from a server script.

FrameLimit

PropertyClient onlyRead only
FrameLimit: number?

FrameLimit is the frame rate cap in frames per second, or nil when uncapped.

Default nil

Errors (1)
Error When
FrameLimit can only be written from a client script Written from a server script.

RenderScale

PropertyClient onlyRead only
RenderScale: number

RenderScale is the internal render resolution multiplier from 0.5 to 1.

Default 1

Errors (1)
Error When
RenderScale can only be written from a client script Written from a server script.

Shadows

PropertyClient onlyRead only
Shadows: "Off" | "Hard" | "Soft"

Shadows is the shadow rendering tier: "Off", "Hard", or "Soft".

Default "Soft"

Errors (1)
Error When
Shadows can only be written from a client script Written from a server script.

Textures

PropertyClient onlyRead only
Textures: "Low" | "Medium" | "High" | "Ultra"

Textures is the texture detail tier: "Low", "Medium", "High", or "Ultra".

Default "High"

Errors (1)
Error When
Textures can only be written from a client script Written from a server script.

GraphicsPreset

PropertyClient onlyRead only
GraphicsPreset: "Low" | "Medium" | "High" | "Ultra" | "Custom"

GraphicsPreset is the active graphics preset: "Low", "Medium", "High", "Ultra", or "Custom".

Default "High"

Errors (1)
Error When
GraphicsPreset can only be written from a client script Written from a server script.

InvertLook

PropertyClient onlyRead only
InvertLook: boolean

InvertLook is true when vertical camera look input is inverted.

Default false

Errors (1)
Error When
InvertLook can only be written from a client script Written from a server script.

CameraMode

PropertyClient onlyRead only
CameraMode: "Classic" | "SmoothFollow"

CameraMode is the camera follow behavior chosen by the player: "Classic" or "SmoothFollow".

Default "Classic"

Errors (1)
Error When
CameraMode can only be written from a client script Written from a server script.

Changed

EventClient onlyRead only
Changed: Signal<(setting: string) -> ()>

Changed fires with the setting name whenever any public client setting changes.

Example

-- Client script.
Settings.Changed:Connect(function(setting: string)
    if setting == "FieldOfView" then
        print(Settings.FieldOfView)
    end
end)
Errors (1)
Error When
Changed can only be written from a client script Written from a server script.

Keybinds

Keybind

FunctionClient only
Keybind(action: PlayerAction) -> InputName?

Keybind returns the input name bound to action, or nil when unbound.

Example

-- Client script.
local key = Settings.Keybind("Chat")
if key then
    print("chat key: " .. key)
end
Errors (1)
Error When
Keybind can only be called from a client script Called from a server script.

KeybindLabel

FunctionClient only
KeybindLabel(action: PlayerAction) -> string?

KeybindLabel returns the display label of the key bound to action, such as "Space" or "Mouse 4", or nil when unbound.

Example

-- Client script.
local label = Settings.KeybindLabel("Chat")
if label then
    print("Press " .. label .. " to chat")
end
Errors (1)
Error When
KeybindLabel can only be called from a client script Called from a server script.

KeybindPressed

FunctionClient only
KeybindPressed(action: PlayerAction) -> boolean

KeybindPressed returns true on the frame the key bound to an action goes down. While the core menu is open, it returns false outside the core menu's own scripts.

Example

-- Client script.
function Update(dt: number)
    if Settings.KeybindPressed("PlayerList") then
        print("toggle the player list")
    end
end
Errors (1)
Error When
KeybindPressed can only be called from a client script Called from a server script.

KeybindChanged

EventClient onlyRead only
KeybindChanged: Signal<(change: KeybindChange) -> ()>

KeybindChanged fires with a KeybindChange table when a player keybind changes.

Example

-- Client script.
Settings.KeybindChanged:Connect(function(change)
    print(change)
end)
Errors (1)
Error When
KeybindChanged can only be written from a client script Written from a server script.
PropertyClient onlyRead only
MenuOpen: boolean

MenuOpen is whether the core menu is open. While it is open, Input reads no keys or buttons.

Default false

Example

-- Client script.
function Update(dt: number)
    -- skip game controls while the menu is open
    if Settings.MenuOpen then
        return
    end
end
Errors (1)
Error When
MenuOpen can only be written from a client script Written from a server script.
EventClient onlyRead only
MenuOpenChanged: Signal<(open: boolean) -> ()>

MenuOpenChanged fires with true when the core menu opens and false when it closes.

Example

-- Client script.
Settings.MenuOpenChanged:Connect(function(open: boolean)
    print(if open then "menu opened" else "menu closed")
end)
Errors (1)
Error When
MenuOpenChanged can only be written from a client script Written from a server script.