@d-healey Actually, I think I just found the error:
local MPN = direction == "up" ? noteObject.y[0] : noteobject.y[noteObject.y.length -1];
vs.
local MPN = direction == "up" ? noteObject.y[0] : noteObject.y[noteObject.y.length -1];
I forgot the camelCase on noteObject for the false branch :P