I am trying to get a lockon system that detects the nearest enemy and fires a script. What's the best way?
COMMUNITY QUESTION
How do I detect distance from one object to another?
1 answer
Yay.
local Distance = (part1.Position - part2.Position).magnitude
print(Distance)
This discussion is preserved as it was. New answers, comments, and votes are closed.
