How do I detect how high or low a player's graphics setting is? I've tried this:
1 | print ( tostring (game:GetService( 'RenderSettings' ).GraphicsQuality)) |
It just returns this:
1 | singleton RenderSettings already exists |
Can you help me? Even I can't figure this out, and I'm a great scripter.
Nevermind about this since the global settings() table is protected and can only be accessed by roblox corescripts and game:GetService'RenderSettings' isn't working, there is no way to access the quality level that I know of, sorry for getting your hopes up.
01 | --[[ |
02 | print(settings().Rendering.QualityLevel) -- Quality level of the player |
03 |
04 | if settings().Rendering.QualityLevel == Enum.QualityLevel.Level21 then -- Level 10 |
05 | print("Highest quality level") |
06 | elseif settings().Rendering.QualityLevel == Enum.QualityLevel.Level01 -- Level 1 |
07 | print("Lowest quality level") |
08 | end |
09 |
10 |
11 | -- The lowest value is Enum.QualityLevel.Level01 (AKA 1) |
12 | -- The highest value is Enum.QualityLevel.Level21 (AKA 10) |
13 | ]] -- |
You can access a user's graphics level through:
UserSettings().GameSettings.SavedQualityLevel
You can do this. (ONLY use this code in a LocalScript, otherwise it will error)
1 | print (UserSettings():GetService( "UserGameSettings" ).SavedQualityLevel)) |
That code returns Enum.SavedQualitySetting.1 which is Level 1 and so on until 10. It sometimes can also return Enum.SavedQualitySetting.Automatic, in that case their level is automatically set by Roblox.