Yo! I opened this topic for this reason:
I need to read user graphic quality and write it in a UI (like a TextLabel)
Like this in this game;
Hello! I think what you’re looking for is for the UserGameSettings, I believe you can use it like this:
local game_settings = UserSettings().GameSettings
--Then you can use listeners:
game_settings.Changed:Connect(function(setting)
print(setting.. " changed!")
end)
And you can access the saved graphic level.
But read the API documentation, I think there was some unusable settings, so trying to print these would be impossible.
Noo like I need to know user graphc quality
Updated the post, you can access it inside the user’s game settings.
Hmm lemme test it if it will work i’ll say
If I made a mistake try this:
local user_settings = UserSettings():GetService("UserGameSettings")
--and you can get the saved quality level:
local graphic_quality = user_settings.SavedQualityLevel
I added a print(graphic_quality)
and works perfectly, thanks!
Great! Hope you make great use of it!
I edited your script a bit and made this:
local user_settings = UserSettings():GetService("UserGameSettings")
local graphic_quality = user_settings.SavedQualityLevel
if graphic_quality == Enum.SavedQualitySetting.Automatic then
script.Parent.Text = "Your quality level is Automatic"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel1 then
script.Parent.Text = "Your quality level is 1"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel2 then
script.Parent.Text = "Your quality level is 2"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel3 then
script.Parent.Text = "Your quality level is 3"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel4 then
script.Parent.Text = "Your quality level is 4"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel5 then
script.Parent.Text = "Your quality level is 5"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel6 then
script.Parent.Text = "Your quality level is 6"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel7 then
script.Parent.Text = "Your quality level is 7"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel8 then
script.Parent.Text = "Your quality level is 8"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel9 then
script.Parent.Text = "Your quality level is 9"
elseif graphic_quality == Enum.SavedQualitySetting.QualityLevel10 then
script.Parent.Text = "Your quality level is 10"
end
Great! You should check if there’s a better way of doing this, let me get on studio
I wrote this down on my phone, don’t know if it’ll work:
local user_settings = UserSettings():GetService("UserGameSettings")
local graphic_quality = user_settings.SavedQualityLevel
local quality_types = Enum.QualityLevel:GetEnumItems()
for i, v in pairs(quality_types) do
print(v)
end
user_settings.Changed:Connect(function()
for i, v in pairs(quality_types) do
if i < 10 and graphic_quality ~= Enum.QualityLevel.Automatic then
if tostring(graphic_quality) == "Enum.QualityLevel.Level0".. tostring(i) then
print(graphic_quality)
end
elseif i >= 10 and graphic_quality ~= Enum.QualityLevel.Automatic then
if tostring(graphic_quality) == "Enum.QualityLevel.Level".. tostring(i) then
print(graphic_quality)
end
elseif graphic_quality == Enum.QualityLevel.Automatic then
print(graphic_quality)
end
end
end)
It may not work at all, but you get the idea, instead of using so many logic, maybe just use a for loop.