i made this script about hanging the player on a wall and if you go on a rotated part it teleports you in the wrong place and ive already tried this:

PrimaryPart.Position.Y + PrimaryPart.Size.Y/2

but i do want it to get the top, even with rotation