How could i make a Linear moving projectile?

I am trying to do a Projectile that moves on a linear direction, really without physics priority, how would i do this?, and also, a few questions i have are :

  1. Should i create the projectile on the server or client?

  2. Should i handle the projectile movement on server or client?

  3. Should i handle the hitbox constantly moving on server or client?

  4. Does LinearVelocity Replicates to server if i decide to use it on the projectile?

hopefully someone that already has experience on these things responds!, but it’s okay, anything is helpful, thank you

  1. It really depends what you’re using the projectile for. If you need server verification then it’s probably best to create it on the server. Otherwise, doing so on the client for visual purposes works great.
  2. You should always try to avoid using the server for most things or the server will end up suffering with performance. The client will always have better performance. So yes, you should handle projectile movement on the client.
  3. Not sure exactly what you mean by this but if you’re attempting to add a Touch event to the projectile then it might work best on the server. But you could always do it on the client and then fire a RemoteEvent. Again it really depends on your use case.
  4. I haven’t used LinearVelocity but I assume it uses Physics. Anything physics related will be replicated to the server as long as you give NetworkOwner to the client.

I would suggest using lerps to move the Projectile from 1 position to another. This is super simple to do, doesn’t rely on physics and will move linear. The only downside to this is that it will not replicate to the server. I would only use lerps if you’re moving something visually for the client only.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.