How to detect a players graphics level then send a notification if lower than 2

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to make a script where it detects a player graphics and if is is lower then 2 it will send a SendNotification
  2. What is the issue? Include screenshots / videos if possible!
    No issues I just need help scripting it, I’ve already tried making one but none of them work :upside_down_face:

Thank you!!

3 Likes

You are looking at UserSettings(), which should give you the Settings, with .GameSettings, look for .SavedQualityLevel, which should give you the Quality level.

3 Likes

I believe you can get a user’s graphics level with this:

local userSettings = UserSettings():GetService("UserGameSettings")
local graphicsQuality = userSettings.SavedQualityLevel

Then you could fire a function if the graphicsQuality.Value is < 2.

2 Likes

must be done in client side:

if UserSettings():GetService("UserGameSettings").SavedQualityLevel < 2 and UserSettings():GetService("UserGameSettings").SavedQualityLevel ~= 0 then
   --send notification
end
1 Like

Hi where would I put this? StartPlayerScripts.?

Yeah, you’d put this in there.

Didn’t work, I tried local and a regular script…

Sorry, the last script had an error in it. This will work 100%, I tested it. It should be in a local script in StarterPlayerScripts, or StarterCharacterScripts

local SavedQualityLevelsEnums = {
	["Low"] = {Enum.SavedQualitySetting.QualityLevel1,Enum.SavedQualitySetting.QualityLevel2,Enum.SavedQualitySetting.QualityLevel3},
	["Mid"] = {Enum.SavedQualitySetting.QualityLevel4,Enum.SavedQualitySetting.QualityLevel5,Enum.SavedQualitySetting.QualityLevel6},
	["High"] = {Enum.SavedQualitySetting.QualityLevel7,Enum.SavedQualitySetting.QualityLevel8,Enum.SavedQualitySetting.QualityLevel9,Enum.SavedQualitySetting.QualityLevel10},
} 

function returnQualityLevel()
	local saveQualityLevel = UserSettings():GetService("UserGameSettings").SavedQualityLevel
	
	for qualityLevel, enumTable in SavedQualityLevelsEnums do
		for _, enum in enumTable do
			if saveQualityLevel == enum then
				 return qualityLevel
			end
		end
	end
	
	return "Automatic"
end

print(returnQualityLevel())

This is a function that returns the quality level as a string. It only fires once when the player joins, so if they change it mid way through it will not update.

4 Likes

Thanks but where would you put the notification?

Yes it works! Thank you so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.