Say I wanted to make a moving projecticle spawn into the world from a localscript every 1 second, and for the hit detection I would cast a ray from the last recorded position of the bullet to the current position of the bullet every heartbeat how would I do that without it being intensely laggy (you know, with the multple rays being created every heartbeat for multiple bullets)

2 comments

0

I was looking into hit detection with objects moved by CFrame just the other day, and I couldn't find a good answer either. Settled on Body physics and part touched events in the end, but detection still isn't perfect. Didn't think about this one; will update you if I find out anything.

0

How is it laggy? I'm shooting 1,800 raycasts per second for a gun I made, no lag.