Look at what Fabrice posted, look at what you tried. Spot the difference ;)
if(Vector3D.distance(model.position,model2.position) < 100) <--right if(p1.distance(model.position,model2.position) < 100) <--wrong
Look at what Fabrice posted, look at what you tried. Spot the difference ;)
if(Vector3D.distance(model.position,model2.position) < 100) <--right if(p1.distance(model.position,model2.position) < 100) <--wrong