What is the best practice for projectiles

  1. Make a function in the client that handles projectile movements. If a projectile is launched, in the server, use RemoteEvent:FireAllClients, then send arguments such as (projectile:Model, direction:Vector3,blahblah). You will also do in the server, for the sake of hitbox

  2. Hitbox detections are done in the server. Small and fast projectiles, like arrows, pebbles or bullets, you need to use raycast. Raycast from the old pos to the current pos. If the projectile is pretty big, lets say a fireball, you can raycast on two corners opposite from each other. For big projectiles, you can use workspace:GetPartsInPart.
    There are also some modules you can use for hitbox detection, like this
    Raycast Hitbox 4.01: For all your melee needs!

5 Likes