diff --git a/Assets/Scripts/Player/PlayerInteractionHandler.cs b/Assets/Scripts/Player/PlayerInteractionHandler.cs index 34ffc95..db0b1fb 100644 --- a/Assets/Scripts/Player/PlayerInteractionHandler.cs +++ b/Assets/Scripts/Player/PlayerInteractionHandler.cs @@ -76,9 +76,11 @@ public class PlayerInteractionHandler : NetworkBehaviour shift = GameObject.Find("CameraHidden").GetComponent(); } - [ServerRpc] + + [ObserversRpc(ExcludeOwner = true)] public void SwitchWeaponMode() { + GunEnabled = !GunEnabled; if (!GunEnabled) pistol.Disable(); @@ -201,7 +203,7 @@ public class PlayerInteractionHandler : NetworkBehaviour { SwitchWeaponMode(); - if (true) { + if (!IsServer) { GunEnabled = !GunEnabled; if (!GunEnabled) pistol.Disable();