Not sure if this'll help but why are you using approximate distances?
you can replace all of this
with ..
Also, instead of your resize mesh function just use FITMESH.
Not sure if this'll help just thought I'd point out a few things
you can replace all of this
Function CheckBox() If Distance(Player,Box) < 2 Then RuntimeError Name$ + "Won!!!!!" EndIf End Function Function Distance(Entity1,Entity2) Entity1Pos = EntityZ(Entity1) + EntityY(Entity1) + EntityX(Entity1) Entity2Pos = EntityZ(Enitiy2) + EntityY(Entity2) + EntityX(Entity2) Return Entity1Pos - Entity2Pos End Function
with ..
Function CheckBox() If entityDistance(Player,Box) < 2 Then RuntimeError Name$ + "Won!!!!!" EndIf
Also, instead of your resize mesh function just use FITMESH.
Not sure if this'll help just thought I'd point out a few things