Destroy Projectile on Server as well as Client

I want to manually destroy a projectile with Projectile:Destroy() but then its still visible from Players on their clients.
The projectile moves very slowy so i dont want it to be seen from a Player if its destroyed on the server.
Is this possible?

I talked with some of the devs and the answer they gave me was that projectiles spawned by weapons will not be able to be modified/destroyed mid-flight. Projectiles spawned by scripts will be able to be modified/destroyed mid-flight.

Ok thank you.

My idea was to associate the Bullet and Trail client folder with the spawned projectile to disable them when the projectile should be destroyed but because i cant alter the code of the weapon projectile spawning i havent found a solution yet.
The only way then is probably to not use the Weapon type and create an own Equipment instead to access the initial projectile spawned but i'll just leave it the way it is right now.

From my tests with the projectile system I found that you cannot call any functions on it after it has been spawned. Why do you need to destroy the projectile? Learning may will allow us to find a solution.

I made a shield (mesh) that either consumes the bullet, lets it pass throught or reflect it regardless of any properties of the bullet itself (bounces/pierces).
Currently on the server side its working so i assume that spawning a Projectile creates one instance on the server as well as one on the client for visual effects.

One thing you can do is disable team collision to allow friendly projectiles to pass through your shield.

That wouldnt change the problem if the projectile is destroyed it will still be visible for players

You would be using the team collision system instead of the the Projectile:Destroy() method.

I think i didnt explain my problem well enough or i didnt understand your answer correctly.

Every Player has a shield.
A shield has a 'health' value which when dropping to 0 letting Projectiles pass.

If a normal projectile hits the shield an is passing through everything works as normal because the projectile is destroyed at the shield mesh and spawned behind it simulating piercing the shield.

The problem is with projectiles that have bounces or pierces:

  • If a bullet has 1 bounce remaining before hitting the shield but has enough Damage to 'destroy' the shield so it would pass through, it is copied and a new projectile is spawned behind the shield. The old one has to be destroyed because otherwise it will bounce on the mesh and move on so there would be 2 projectiles in the world visible for the player.

  • I noticed another problem which appears on piercing bullets which are sometimes stopping mid-air when hitting the player after passing the shield (sometimes different from each players view)

So its not a problem for shields of the same team but for enemy shields which have to have collision enabled otherwise they would never destroy enemy bullets. Its more or less the opposite, i must use the collision otherwise i have no way to remove projectiles on the client.

Got it. If you need to destroy the bullet mid-flight, I would recommend writing two scripts. One destroys the bullet on the server. The other script destroys the client-side bullet (I haven't tested this yet). If you can't destroy the client-side bullet, try destroying everything within the client context folder of the bullet.