Quantcast
Channel: Questions in topic: "gun"
Viewing all articles
Browse latest Browse all 592

Unet isLocalplayer issues with child objects of player

$
0
0
Hi im still new at networking with unity but i do enjoy the challenges, one of the issues im facing at the moment is this. i have a weapon script on my player > gun (Child object of player, also has a network identity on it) when i put the script on the main player it works perfectly fine but as soon as i call if(!isLocalPlayer) return; nothing after this will run on the script if the script is on my gun, only works if its on my player. can someone tell me whats going on with this please? do i need to have all my scripts on the player(Primary GameObjec) or can i have scripts on the child objects.

Viewing all articles
Browse latest Browse all 592

Trending Articles