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

How To Make A Low Graphic System?

Asked by 3 years ago
Edited 3 years ago

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)
0
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. Acc3l3rate 0 — 3y
0
simple: on client side remove all features that cause lag and are graphic intensive BashGuy10 384 — 3y
0
Low poly? iivSnooxy 248 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

So the pairs doesn't know what you're trying to do, you need to guide it lol.

local button = script.Parent

button.MouseButton1Click:Connect(function() --//Changed this to click so it works for mobile users as well
 for i, v in pairs(game.Workspace:GetChildren()) do --//We add get children so we gather everything in workspace.
    if v:IsA("Part") then
v.Material = "SmoothPlastic"
        end
    end
end)
0
thank you for the help this will help me so much. IEatToaster 9 — 3y
Ad

Answer this question