How to make a button that disables roblox textures?

I am a bit new to coding and scripted and built a settings gui that disables bloom sunrays and stuff thats in lighting, but I’m wondering how i can make it disable textures to reduce lag for low end players. I haven’t tried any solutions yet because I’m not sure this is possible so im just asking.

like grass and other materials?

What I can suggest is you set the Transparency of the Texture instance to 1, that may speed up of rendering. Have it loop through the Workspace and find if the child is a Texture then set it’s Transparency.

1 Like

Oh thanks, I’ll try that but what i really meant is like grass, slate, concrete and them kind of materials and not the actual texture thing that you place into bricks.

try like

while wait(.1) do
    for i, v in pairs(game.Workspace:GetDescendants()) do
        if v:IsA("BasePart") then
            v.Material = Enum.Material.SmoothPlastic
        end
    end
end
1 Like

Do you mean BasePart Textures/Materials? If so, the other property of BasePart is Material. I think you can change it to plastic or air. (Air is probably not a valid material, but you can check out the link)

Edit: It was supposed to be “BasePart Textures/Materials”, not “Textures”.

Oh right, thanks. Much appreciated.

But how can you revert this actions?

I solved it in a game like this:

local E2 = Einstellungen.ScrollingFrame.E2
local texture = false
E2.TextButton.MouseButton1Click:Connect(function()
	for _, object in ipairs(workspace:GetDescendants()) do
		if object:IsA("BasePart") then
			if texture and object:FindFirstChild("OriginalMaterial") then
				object.Material = object.OriginalMaterial.Value
				object.OriginalMaterial:Destroy()
				E2.ImageLabel.Image = "rbxassetid://6705622004"
			elseif not texture then
				local originalMaterial = Instance.new("StringValue")
				originalMaterial.Name = "OriginalMaterial"
				originalMaterial.Value = object.Material.Name
				originalMaterial.Parent = object
				object.Material = Enum.Material.SmoothPlastic
				E2.ImageLabel.Image = "rbxassetid://6705622070"
			end
		end
	end
	texture = not texture
end)

Don’t pay attention to my locals “E2” and E2.ImageLabel.Image. It just changes the appearance of the ImageButton.

Image from Gyazo

7 Likes