PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

UserGameSettings

Show deprecated

UserGameSettings

Show deprecated

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:

UserSettings():GetService("UserGameSettings")

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.

Properties

ComputerCameraMovementMode

ComputerCameraMovementMode

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

ComputerMovementMode

ComputerMovementMode

The movement type in-use by the client via Computer input.

ControlMode

ControlMode

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

float

GamepadCameraSensitivity

Describes how sensitive the camera is when using a gamepad.

float

MasterVolume

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

float

MouseSensitivity

A float representing the sensitivity of the client’s mouse.

RotationType

RotationType

Controls how the client’s character is rotated.

SavedQualitySetting

SavedQualityLevel

The graphics quality level set by the client.

TouchCameraMovementMode

TouchCameraMovementMode

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

TouchMovementMode

TouchMovementMode

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

Inherited from Instance: Show Hide

int

DataCost

[ReadOnly] [NotReplicated]
The cost of saving the instance using data persistence.
Instance

Parent

Determines the hierarchical parent of the `Instance`.
bool

RobloxLocked

If true, the `Instance` and its descendants cannot be indexed or edited by a `Script` or `LocalScript` and will throw an error if it is attempted.
string

ClassName

[ReadOnly] [NotReplicated]
A read-only string representing the class this `Instance` belongs to.
string

Name

A non-unique identifier of the `Instance`.
bool

Archivable

Determines if an `Instance` can be cloned using `/Instance/Clone` or saved to file.

Functions

int

GetCameraYInvertValue ( )

Returns the camera’s Y-invert value.

bool

GetOnboardingCompleted ( string onboardingId )

Returns true if the specified onboardingId has been recorded as complete via UserGameSettings/SetOnboardingCompleted.

bool

InFullScreen ( )

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

bool

InStudioMode ( )

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

void

SetCameraYInvertVisible ( )

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

void

SetGamepadCameraSensitivityVisible ( )

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

void

SetOnboardingCompleted ( string onboardingId )

Records that the user has finished the specified onboardingId.

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.

Inherited from Instance: Show Hide

string

GetFullName ( )

Returns a string describing the `Instance`'s ancestry.
RBXScriptSignal

GetPropertyChangedSignal ( string property )

Get an event that fires when a given property of an object changes.
Instance

FindFirstChildWhichIsA ( string className , bool recursive )

Returns the first child of the `Instance` for whom `Instance/IsA` returns true for the given className.
Array

GetDescendants ( )

[CustomLuaState]
Returns an array containing all of the `Instance`'s descendants.
bool

IsAncestorOf ( Instance descendant )

Returns true if an `Instance` is an ancestor of the given descendant.
bool

IsDescendantOf ( Instance ancestor )

Returns true if an `Instance` is a descendant of the given ancestor.
Instance

FindFirstChildOfClass ( string className )

Returns the first child of the `Instance` whose `Instance/ClassName|ClassName` is equal to the given className.
Instance

FindFirstChild ( string name , bool recursive )

Returns the first child of the `Instance` found with the given name.
Instance

FindFirstAncestorWhichIsA ( string className )

Returns the first ancestor of the `Instance` for whom `Instance/IsA` returns true for the given className.
Instance

FindFirstAncestorOfClass ( string className )

Returns the first ancestor of the `Instance` whose `Instance/ClassName` is equal to the given className.
Instance

FindFirstAncestor ( string name )

Returns the first ancestor of the `Instance` whose `Instance/Name` is equal to the given name.
bool

IsA ( string className )

Returns true if an `Instance`'s class matches or inherits from a given class
Instance

WaitForChild ( string childName , double timeOut )

[CustomLuaState] [CanYield]
Returns the child of the `Instance` with the given name. If the child does not exist, it will yield the current thread until it does.
string

GetDebugId ( int scopeLength )

[NotBrowsable]
Returns a coded string of the `Instance`s DebugId used internally by Roblox.
Objects

GetChildren ( )

Returns an array containing all of the `Instance`'s children.
void

Destroy ( )

Sets the `Instance/Parent` property to nil, locks the `Instance/Parent` property, disconnects all connections and calls Destroy on all children.
Instance

Clone ( )

Create a deep copy of a Roblox instance and descendants where `Archivable = true`.
void

ClearAllChildren ( )

This function destroys all of an `Instance`'s children.

Events

RBXScriptSignal

FullscreenChanged ( bool isFullscreen )

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

RBXScriptSignal

StudioModeChanged ( bool isStudioMode )

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.

Inherited from Instance: Show Hide

RBXScriptSignal

DescendantRemoving ( Instance descendant )

Fires immediately before a descendant of the `Instance` is removed.
RBXScriptSignal

AncestryChanged ( Instance child , Instance parent )

Fires when the `Instance/Parent` property of the object or one of its ancestors is changed.
RBXScriptSignal

ChildAdded ( Instance child )

Fires when an object is parented to this `Instance`.
RBXScriptSignal

ChildRemoved ( Instance child )

Fires when a child is removed from this `Instance`.
RBXScriptSignal

DescendantAdded ( Instance descendant )

Fires when a descendant is added to the `Instance`.
RBXScriptSignal

Changed ( string property )

Fired immediately after a property of an object changes.