The game I've created has snow, which bogs down just about everyone's computer. I was wanting to know how to disable the script through a GUI.
My Current code that disables the script:
for i, b in ipairs(script.Parent:GetChildren()) do
if b:IsA("TextButton") then
b.MouseButton1Down:connect(function()
script.Parent.Snow.Enabled = false
end)
b.MouseButton1Up:connect(function()
script.Parent.Snow.Enabled = false
end)
end
end
game.Players.LocalPlayer:GetMouse().Button1Up:connect(function()
end)

2 comments
Have you created this snow effect? Have you simply considered making the snow effect more efficient?
Yes. I've created the snow script, but I don't know how to optimize it. It's a local script, and the snow is made out of parts.