Bloxfruits has this thing called "Fast mode", when you enable it, all the part's material gets changed to smoothplastic. Not instantly, but they go through the parts so quickly. Does anyone know how I can achieve this?
I've tried doing this:
local Parts = {}
local RenderStepped = game:GetService("RunService").RenderStepped
for i,v in ipairs(Workspace:GetDescendants()) do
if v:IsA("BasePart") then
table.insert(Parts, v)
end
end
warn(#Parts)
local Tick = tick()
for i,v in ipairs(Parts) do
task.spawn(function ()
v.Material = Enum.Material.SmoothPlastic
end)
RenderStepped:Wait()
end
warn("Took: ", tick() - Tick)
This script takes whole 5 minutes on 13000+ parts, meanwhile in Blox Fruits they loop through the same amount of parts in less than 30 seconds.
Any help would be appreciated, thanks.

7 comments
The wait is necessary, that's the whole point of the script. With or without the task.spawn, it takes 5x times more. Still thanks
My other guess is for you to change the materials of a few parts at once. If you looped through 13000 parts and it waited 0.01 seconds in between each it would take 130 seconds.
VS looping through 13000 parts and changing the material of 5 parts at once which takes 26 seconds
That's actually what I was trying to do, but I'm not sure how to do it. Could you please help? Thanks
Check edit for an example
That actually works great, thanks! how do i mark it as answer?
I think there is an "Accept Answer" button beneath the comment bar