Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Accessing a players Graphics Quality?

After doing some research I stumbled upon RenderSettings which looked promising with it's QualityLevel property. But after trying to access it with game:GetService("RenderSettings").QualityLevelI got this error:

singleton RenderSettings already exists

Any help is very much appreciated. :)

2 answers

Well it seems 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.


--[[
local render = settings().Rendering
local qualitylevel = render.QualityLevel -- Quality level of the player


 For some reason unbeknownst to me, the quality levels range from Enum.QualityLevel01 -Enum.QualityLevel21, even when you can only change the quality level bar to levels 01,04,06,08,10,12,14,16,18, and 21 in the default roblox settings tab


if qualitylevel == Enum.QualityLevel.Level21 then -- Level 10
print("Highest quality level")
elseif qualitylevel == Enum.QualityLevel.Level01 then-- Level 1
print("Lowest quality level")
end
 
 
-- The lowest value is Enum.QualityLevel.Level01 (AKA 1)
-- The highest value is Enum.QualityLevel.Level21 (AKA 10)
]]--

2 comments

0

Did you test this yourself? And if so, it was in a local script right? For some reason I get an error from the code you gave; here it is: 14:07:23.126 - An error occurred 14:07:23.126 - Script 'Players.Player1.PlayerScripts.LocalScript', Line 1

0

Oops, I only ran the script in the commandbar, the settings() table is protected and cant be accessed by scripts, sorry about that.

I just played around with RenderSettings, and the error you receive happens even when just calling RenderSettings like this:

renset = game:GetService("RenderSettings")

I tried looking around the Wiki for more, but there isn't much on the Wiki about RenderSettings. I don't think it resides in each player though. So I don't think you can be like

game.Players.PlayerName.QualityLevel

or anything like that.

I'm sorry I couldn't offer more help. I tried to get the QualityLevel of anything in-game, and all it says is "QualityLevel is not a valid member of ..."

2 comments

0

Thanks for trying ...

0

If you cannot help the OP then simply comment rather than answering.

This discussion is preserved as it was. New answers, comments, and votes are closed.