From c7591bbb674a868fef8029c114df965296f59460 Mon Sep 17 00:00:00 2001 From: sebastianhampel1 Date: Thu, 15 Jun 2023 11:58:17 -0400 Subject: [PATCH] Update PistolComponent.cs --- Assets/Scripts/Item/Pistol/PistolComponent.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Item/Pistol/PistolComponent.cs b/Assets/Scripts/Item/Pistol/PistolComponent.cs index 3746dc3..ac5fa4f 100644 --- a/Assets/Scripts/Item/Pistol/PistolComponent.cs +++ b/Assets/Scripts/Item/Pistol/PistolComponent.cs @@ -53,6 +53,7 @@ namespace Item public override void OnStartClient() { base.OnStartClient(); + if (!IsOwner) { this.enabled = false; @@ -142,7 +143,9 @@ namespace Item shootLight.gameObject.SetActive(true); var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); - InstanceFinder.ServerManager.Spawn(projectile); + + InstanceFinder.ServerManager.Spawn(projectile,Owner); + projectile.transform.localPosition = Vector3.zero; projectile.transform.localEulerAngles = Vector3.zero;