I can't seem to find what wrong with the script and the output isn't coming up with errors.
mode = game.Workspace:GetChildren()
for i,v in pairs (mode) do
if v.Parent:IsA("Part") then
v.Parent.Name = "Part" .. v
print(v.Name) wait(1)
end
end
If I could help I'll be grateful.

2 comments
What is not working about it? "BasePart" is the class from which all Part types inherit from, use that for greater generality.
This will loop through all the objects in workspace, not their children. Therefore 'v.Parent' will always be workspace.