Hi i wanted to make a feature where you can lower your graphic and making your game less laggy by removing all the material of the game when you press a textbutton. Is there a way i could do that? here is the script that i used
local button = script.Parent
button.MouseButton1Down:Connect(function()
for i, v in pairs() do
if v:IsA("Part") then
v.Material = "SmoothPlastic"
end
end
end)

3 comments
Well I don't exactly get what you're trying to do but the script you shown won't work because of line 4. You haven't put a parameter in the pairs() part. You should put a table to loop through.
simple: on client side remove all features that cause lag and are graphic intensive
Low poly?