The code is meant to make it so that that all the parts in Workspace Called "Part" get saved whenever you press z on your keybord.
Player = game.Players.LocalPlayer
mouse = Player:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "z" then
local c = game.Workspace:GetChildren()
for i = 1, #c do
if (c[i].Name == "Part") then
c[i]:SavePlace(Enum.SaveFilter.SaveAll)
end
end
end
end)
Thank you

3 comments
KeyDown doesn't return a string, it returns a number equivalent to the key's byte value. Instead of comparing key to z, compar key to "z":byte()
@aquathorn321 No, keydown returns a string. It's deprecated though, so it shouldn't really be used.
I know the Keyboard Script works. Ive tested it on other stuff. Its the SavePlace() Thing I cant get to work...