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
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
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
thx
Happy to help!