I am making a game where you can ride a horse, and if the horse gets too close to a part, it dodges out of the way. I am currently stuck on how I could determine if there is a part nearby. Please help!
COMMUNITY QUESTION
How would I determine if there is a part nearby?[SOLVED BY MYSELF]
1 answer
local magnitude = (part1.Position - part2.Position).magnitude
print(magnitude)
--Change the parts to whatever fits your needs.
Directly from wiki.
1 comment
0
I guess I could use magnitude, but then I would have to test for every block in the game :/
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Best bet is to use raycasting to and have multiple rays shoot out from the front of the horse in multiple directions in front..
Sounds awesome ^
Hmm... okay
I don't know how to use raycasting >_<
Just searched it up on the wiki and am confused