For i,v in pairs help

Just do:

for i,v in pairs(workspace:GetDescendants()) do
    if v:IsA("BasePart") then
        v.Material = "Plastic"
    end
end

You forgot to add the ends

1 Like