Engine Class
UserGameSettings
Summary
Properties
Methods
GetOnboardingCompleted(onboardingId: string):boolean |
SetOnboardingCompleted(onboardingId: string):() |
Events
FullscreenChanged(isFullscreen: boolean):RBXScriptSignal |
StudioModeChanged(isStudioMode: boolean):RBXScriptSignal |
Code Samples
UserGameSettings Listener
local gameSettings = UserSettings().GameSettings
local function onGameSettingChanged(nameOfSetting)
-- Fetch the value of this setting through a pcall to make sure we can retrieve it.
-- Sometimes the event fires with properties that LocalScripts can't access.
local canGetSetting, setting = pcall(function()
return gameSettings[nameOfSetting]
end)
if canGetSetting then
print("Your " .. nameOfSetting .. " has changed to: " .. tostring(setting))
end
end
gameSettings.Changed:Connect(onGameSettingChanged)API Reference
Properties
ComputerCameraMovementMode
ControlMode
Methods
GetOnboardingCompleted
SetCameraYInvertVisible
UserGameSettings:SetCameraYInvertVisible():()
Returns
()
SetGamepadCameraSensitivityVisible
UserGameSettings:SetGamepadCameraSensitivityVisible():()
Returns
()
Events
FullscreenChanged
Parameters
Code Samples
Full Screen Mode Detection
local gameSettings = UserSettings().GameSettings
local function checkFullScreenMode()
local inFullscreen = gameSettings:InFullScreen()
if inFullscreen then
print("Full Screen mode enabled!")
else
print("Full Screen mode disabled!")
end
end
checkFullScreenMode()
gameSettings.FullscreenChanged:Connect(checkFullScreenMode)StudioModeChanged
Parameters