I’m trying to change the material of all parts in workspace to plastic, could someone help? this script is erroring.
for i,v in pairs(game.Workspace:GetDescendants()) do
if v:IsA(“BasePart”) then
v.Material = “Plastic”
I’m trying to change the material of all parts in workspace to plastic, could someone help? this script is erroring.
for i,v in pairs(game.Workspace:GetDescendants()) do
if v:IsA(“BasePart”) then
v.Material = “Plastic”
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
for i,v in pairs(game.Workspace:GetDescendants()) do
if v:IsA(“BasePart”) then
v.Material = “Plastic”
end
end
your issue was forgetting to insert 2 ends