Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I detect Quality Level changes?

Asked by 7 years ago

So I know as much as this, as briefly documented by the wiki:

print(UserSettings():FindService('UserGameSettings').SavedQualityLevel)

But how do I detect changes of it?

2 answers

Log in to vote
1
Answered by 7 years ago

Thanks for asking, I've wondered this too before, but just tampering with it for 5 seconds, led me to the conclusion and simple answer.

UserSettings():FindService("UserGameSettings").Changed:connect(function(one) print(one)  
    if one == "SavedQualityLevel" then 
        print("Changed!")
        print(UserSettings():FindService('UserGameSettings').SavedQualityLevel)
    end

    -- you can also use this for other things, and your welcome btw.
end)

you are free to use this for other purposes too, example:

UserSettings():FindService("UserGameSettings").Changed:connect(function(one) print(one)  
    if one == "MasterVolume" then 
        print("Changed!")
        print(UserSettings():FindService('UserGameSettings').MasterVolume)
    end

    -- you can also use this for other things, and your welcome btw.
end)
0
Notice how I said "I dont think there is a .Changed property for that service." Dont needa be so cocky, plus you got the idea from my post. lol ObscureIllusion 352 — 7y
1
First of all. No, I actually didn't get the idea from your post, your post was after I toyed with it. Second of all, I answered it right and it works, are you just jealous? DaCrazyDev 444 — 7y
0
Saying "you're welcome" like that is kinda rude, since the asker never said "thank you". :/ Overscores 381 — 7y
1
"--you can also use this for other things, and your welcome btw." >> you're* Vezious 310 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

Youd probably have to use a while wait() do loop, as I dont believe the property .Changed is available for that service.

Answer this question