Projectile/bullet delay

  1. I’m making a game based on survival and crafting that will be in first person and I thought I should start with the process of creating a gun so I made a simple test script for a projectile that uses body velocity to hit a target you clicked on screen using mouse.hit.p and then damages the target if it has a humanoid

  2. The problem I’ve encountered making this script was that when the projectile was created and positioned to the barrel it would freeze for a second and then launch itself to where ever the player clicked. I managed to somewhat fix this issue but there’s still one issue I’m not sure about

  3. The solutions I tried: Instead of using clone() I thought maybe cloning was maybe a laggy option so I did instance.new which gave me better results but it still would lag just like before and then I found a solution where I would just use setnetworkowner() to the player which stopped the lag completely on the players end but not on the end of others player who view the projectile and they see it lag so that means they can dodge the projectile before it uses it bodyvelocity and im wondering if theres a fix for that?

1 Like

Don’t use BodyMovers for this. That’s the solution.

But what he would use instead of BodyMovers?

Raycasting, and you can make it more complex and have bullet drop and velocity loss with Raycasting as well.

1 Like

Great module for what you’re asking for, FastCast. It uses raycasting to check for parts, and allows for an ignorelist, so you can ignore parts if needed.