How can I make a script that changes graphics?

So Im trying to make a script where when a button is clicked, the player’s graphics are lowered. But on line 10 I keep getting an error.

– get the button
local Players = game:GetService(“Players”)
local player = Players.LocalPlayer – get the local player
local gui = player:WaitForChild(“PlayerGui”) – get the PlayerGui
local button = gui.ScreenGui.Button – get the button

– function to lower the graphics
local function lowerGraphics()
local userSettings = game:GetService(“UserSettings”)
local gameSettings = userSettings.GameSettings
gameSettings.GraphicsMode = Enum.GraphicsMode.NoGraphics
end

– connect the function to the button’s click event
button.Activated:Connect(lowerGraphics)

GraphicsMode is not a value that you can write to, and as such can not be modified through scripts.

Overall, GameSettings is not accessibly by scripts, hence causing an error

1 Like

The closest thing to changing graphics is stopping textures and specific models from loading.

2 Likes

Thanks! I’ll be sure to look into that!

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