Update PistolComponent.cs

This commit is contained in:
sebastianhampel1 2023-06-15 11:58:17 -04:00
parent f668a66bb9
commit c7591bbb67

View File

@ -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;