Can't cause damage to enemy via client, only server

So, in my game I have 2 friendly characters that wan’t to cause damage to all the enemies. On the server host, this works just fine and the host can kill the enemy with projectiles. However, on the client, the projectiles don’t seem to cause damage and im not sure why.

This is when the projectile hits an enemy

http://puu.sh/kqUsj/131f442e62.png

And this is the SMG spawning the projectiles

http://puu.sh/kqUvC/0d3b27d46e.png

I’m still really new to the networking aspect (as of yesterday) and am trying to fully understand it. I don’t know where the root of the problem lies. I can provide more info if need be.

Still need help with this, have tried a few things, but I don’t think im doing it correctly but it hasn’t worked correctly

Hi, I Recommend that you look at more stuff to do with replication as, I don’t see from any of your pictures that you are making any server events, Damage should be handled on the server and replicated to clients. When you make a custom event you can make it run on the server or on owning client. The other thing you need to do is have the health as a replicated variable other wise it just will not work. How I learnt was to download the multilayer shoot out project and look at how it is being done there. How this helped :slight_smile:

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