So I have been using raycasting to detect obstacles in front of moving parts when they come in contact with them; however, this has required me to constantly create new rays for every stud the part moves (which I feel takes up a lot of processing power). Is there a way to simply create one ray that stays attached to the position of a part? So far this is what I've been using:
local ray = Ray.new(Push.CFrame.p, Push.CFrame.lookVector * 2)

1 comment
short answer: no. long answer: not literally