Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Players can't shoot eachother?

$
0
0
Hey guys! So, I've been working with PUN for a while now, but whatever I do, I can't seem to get shooting to work. The problem is (by the title) that players can't shoot each other, and I have no idea why! But all I DO know is this: When a player shoots, they do detect shooting other players. When the player shoots another player, it get's a script on the other player and calls a function that deals damage to that player. Well, I use getComponent to get that script, but when I shoot, the GetComponent doesn't go through! In other words, for some reason I can't access the script! Here's my code to do the damage on the local player: https://paste.myst.rs/70m And my code to take damage on the other players: https://paste.myst.rs/vvw Any help would MUCH appreciated. Thanks!

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>