isOnPoint=function(pos,point,dist) x,y=point.Size.x/2,point.Size.y/2 pox,poy=point.Position.x,point.Position.y px,py=pos.x,pos.y if x + pox - px >= x and x + pox + px <= x then if y + poy - py >= y and y + poy + py <= y then return true end end return false end
this is my function. my function doesnt work. its not erroring. the math is just off by a lot. I'm trying to find if my character is over a square point. Can anyone help me with this? I'm not looking for magnitude.