UserGameSettings

Show Deprecated
Not Creatable
User Settings

The UserGameSettings is a singleton class found inside of the UserSettings singleton. It holds various persistent settings relating to how the user wants to control their camera, and their character.

You can access this object from a LocalScript via:


1UserSettings():GetService("UserGameSettings")
2

This object is intended to be used on the client only, as it serves no purpose on the server. It will also reflect your own settings when testing in Roblox Studio.

Code Samples

UserGameSettings Listener

1local gameSettings = UserSettings().GameSettings
2
3local function onGameSettingChanged(nameOfSetting)
4 -- Fetch the value of this setting through a pcall to make sure we can retrieve it.
5 -- Sometimes the event fires with properties that LocalScripts can't access.
6 local canGetSetting, setting = pcall(function()
7 return gameSettings[nameOfSetting]
8 end)
9
10 if canGetSetting then
11 print("Your " .. nameOfSetting .. " has changed to: " .. tostring(setting))
12 end
13end
14
15gameSettings.Changed:Connect(onGameSettingChanged)

Summary

Properties

HIDDEN
NOT REPLICATED

The camera movement mode currently in-use by the client on desktop.

The type of controls being used by the client on desktop.

Toggles whether or not the client can use the Mouse Lock Switch mode.

HIDDEN
NOT REPLICATED

Describes how sensitive the camera is when using a gamepad.

HIDDEN
READ ONLY
NOT REPLICATED
HIDDEN
READ ONLY
NOT REPLICATED

A float between 0 and 1 representing the volume of the game's client.

HIDDEN
READ ONLY
NOT REPLICATED
HIDDEN
READ ONLY
NOT REPLICATED

A float between 0 and 100 representing the sensitivity of the client's mouse.

Controls how the client's character is rotated.

The graphics quality level set by the client.

NOT REPLICATED
NOT SCRIPTABLE
NOT REPLICATED
NOT SCRIPTABLE
NOT REPLICATED
NOT SCRIPTABLE

The camera type in-use by the client while on a mobile device.

The type of controls being used by the client on a mobile device.

Events


Fires if the user's full screen mode is changed.

PerformanceStatsVisibleChanged(isPerformanceStatsVisible: boolean): RBXScriptSignal  



Fired when the user's client switches between studio mode and in-game mode. This gets fired periodically in Roblox Studio when a session starts.

Methods


Returns the camera's Y-invert value.


Checks if onboarding has been completed.

GetTutorialState(tutorialId: string): boolean  



Returns true if the user's Roblox window is in full screen mode.


Returns true if the client's game session is in Roblox Studio.

ResetOnboardingCompleted(onboardingId: string): void  



If called, Roblox toggles the menu option to invert the user's camera y axis.


If called, Roblox toggles the menu option to control the camera sensitivity with gamepads.

SetOnboardingCompleted(onboardingId: string): void  

Sets onboarding as completed.

SetTutorialState(tutorialId: string, value: boolean): void  


Properties

AllTutorialsDisabled

CameraYInverted

Hidden
Not Replicated

ComputerCameraMovementMode

The camera movement mode currently in-use by the client on desktop.

ComputerMovementMode

The type of controls being used by the client on desktop.

ControlMode

Toggles whether or not the client can use the Mouse Lock Switch mode.

DefaultCameraID

Hidden
Not Replicated

GamepadCameraSensitivity

Describes how sensitive the camera is when using a gamepad.

GraphicsQualityLevel

IsUsingCameraYInverted

Hidden
Read Only
Not Replicated

IsUsingGamepadCameraSensitivity

Hidden
Read Only
Not Replicated

MasterVolume

A float between 0 and 1 representing the volume of the game's client.

MicroProfilerWebServerEnabled

MicroProfilerWebServerIP

Hidden
Read Only
Not Replicated

MicroProfilerWebServerPort

Hidden
Read Only
Not Replicated

MouseSensitivity

A float between 0 and 100 representing the sensitivity of the client's mouse.

MouseSensitivityFirstPerson

Hidden
Not Replicated

MouseSensitivityThirdPerson

Hidden
Not Replicated

OnScreenProfilerEnabled

OnboardingsCompleted

PerformanceStatsVisible

RCCProfilerRecordFrameRate

RCCProfilerRecordTimeFrame

RotationType

Controls how the client's character is rotated.

SavedQualityLevel

The graphics quality level set by the client.

StartMaximized

Not Replicated
Not Scriptable

StartScreenPosition

Not Replicated
Not Scriptable

StartScreenSize

Not Replicated
Not Scriptable

TouchCameraMovementMode

The camera type in-use by the client while on a mobile device.

TouchMovementMode

The type of controls being used by the client on a mobile device.

UsedCoreGuiIsVisibleToggle

UsedCustomGuiIsVisibleToggle

UsedHideHudShortcut

VRRotationIntensity

VRSmoothRotationEnabled

VignetteEnabled

Events

FullscreenChanged

Fires if the user's full screen mode is changed. The event will only fire on desktop devices that can toggle full screen mode. The game will always be in full screen on mobile devices and consoles.

Parameters

isFullscreen: boolean

Code Samples

Full Screen Mode Detection

1local gameSettings = UserSettings().GameSettings
2
3local function checkFullScreenMode()
4 local inFullscreen = gameSettings:InFullScreen()
5 if inFullscreen then
6 print("Full Screen mode enabled!")
7 else
8 print("Full Screen mode disabled!")
9 end
10end
11
12checkFullScreenMode()
13gameSettings.FullscreenChanged:Connect(checkFullScreenMode)

PerformanceStatsVisibleChanged

Roblox Script Security

Parameters

isPerformanceStatsVisible: boolean

StudioModeChanged

Fired when the user's client switches between studio mode and in-game mode. This gets fired periodically in Roblox Studio when a session starts.

Parameters

isStudioMode: boolean

Methods

GetCameraYInvertValue

Returns the camera's Y-invert value.


Returns

GetOnboardingCompleted

Checks whether or not the given onboarding has been completed yet, which is useful for avoiding showing the onboarding animation again.

If onboardingId is not one of the accepted IDs, an error is thrown.

The onboarding process is one-way. This means that, as a developer, you can force the onboarding process to completion but cannot reset it.

See also:

Parameters

onboardingId: string

The onboarding ID to inquire about.


Returns

Whether or not the onboarding in particular has been completed yet.

GetTutorialState

Roblox Script Security

Parameters

tutorialId: string

Returns

InFullScreen

Returns true if the user's Roblox window is in full screen mode.


Returns

InStudioMode

Returns true if the client's game session is in Roblox Studio.


Returns

ResetOnboardingCompleted

void
Roblox Script Security

Parameters

onboardingId: string

Returns

void

SetCameraYInvertVisible

void

If called, Roblox toggles the menu option to invert the user's camera y axis.


Returns

void

SetGamepadCameraSensitivityVisible

void

If called, Roblox toggles the menu option to control the camera sensitivity with gamepads.


Returns

void

SetOnboardingCompleted

void

Sets the given onboarding as completed, so it won't be shown again to the user the next time they play.

Currently, this function only accepts DynamicThumbstick, and it is used to persistently track whether or not the player has finished the tutorial for the Dynamic Thumbstick control scheme. If onboardingId is not one of the accepted IDs, an error is thrown.

The onboarding process is one-way. This means that, as a developer, you can force the onboarding process to completion but cannot reset it.

See also:

Parameters

onboardingId: string

The onboarding ID to set as completed.


Returns

void

No return.

SetTutorialState

void
Roblox Script Security

Parameters

tutorialId: string
value: boolean

Returns

void