Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[SOLVED] How do I detect if an object is in-between two points?

Sorry for the fact that there is not much code here, but I couldn’t think of how to do it. I want to run a function when there are no objects in between two parts, but I can’t think of how to do it. The only thing I can think of is that it would have something to do with the magnitude property.

e,g.

local part1 = workspace.Part1
local part2 = workspace.Part2

print(part1.Position - part2.Position).magnitude

How do I detect if there is an object in between these two parts?

1 comment

0

Look up Region3.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.