What i’m trying to do here is save a part material for later, change the said part material to something else then after a while change the part material to the saved one.
Is there any ways to do this besides a for loop?
-- saved part material
for _,v in pairs(game.Workspace.Map.Lights:GetChildren()) do
if v:IsA("Part") then
v.Material = Enum.Material.Neon
end
end
-- changing the part material
for _,v in pairs(game.Workspace.Map.Lights:GetChildren()) do
if v:IsA("Part") then
v.Material = Enum.Material.SmoothPlastic
end
end
-- changing it back to the saved part material.
for _,v in pairs(game.Workspace.Map.Lights:GetChildren()) do
if v:IsA("Part") then
v.Material = Enum.Material.Neon
end
end