so i want a part to stick to the other part but it says Z cannot be assigned to
while true do script.Parent.Position.Z = script.Parent.Parent.Part2.Position.Z - 1 end
You can't change the z value of a position, you would have to do this instead.
while true do local pos = script.Parent.Parent.Part2.Position script.Parent.Position = Vector3.new(pos.X, pos.Y, pos.Z - 1) wait() -- Don't forget the wait() end