I'm attempting to create a mining unit shot from orbit. (Using BodyPosition) When it's close enough to the surface, I want it to anchor (and do some other trippy stuff yet to be added to the script) However, I'm struggling with the Vector3.FromAxis
local body = script.Parent
local destination = Vector3.FromAxis(y (15)) --I'm struggling with figuring out what to do here.
local closeEnough = 1
while (body.Position - destination).magnitude > closeEnough do
wait(0.1)
end
if (body.Position - destination).magnitude > closeEnough then do
body.Anchored = true
end
end
I have no idea if the script will work at all, but this is the current roadblock I'm facing. Anyone know what I'm supposed to put here?

1 comment
This came close enough. However I ended up using: if (script.Parent.Position.Y <= 25) then