Spawning objects in multiplayer game

HELLO FELLOW UNITY LOVERS!

Okay my problem is:
I have made a script that when a player hits the input “Earth 2” it spawns a wall (Looks like a rock, made it in blender).

When the wall spawns it spawns in front of the player who used the input… but it also spawns the wall in front of the other players who didn’t use the input “Earth2” . How do I make it only spawn infront of the player who used it?

This is my code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class earthwall : MonoBehaviour
{

    public GameObject Earthwall;

    private float fireStart = 0f;
    private float fireCooldown = 0.1f;


    // Use this for initialization
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

        if (!isLocalPlayer)
        {
            return;
        }
        if (Input.GetButton("Earth2"))
        {

            if (Time.time > fireStart + fireCooldown)
            {
                fireStart = Time.time;

                GameObject InstantiatedProjectile = (GameObject)Network.Instantiate(Earthwall, transform.position, transform.rotation, 0);

            }
        }
    }
}

ALSO:
isLocalPlayer is an error??

THANKS IN ADVANCE!!

isLocalPlayer comes from namespace called UnityEngine.Networking that you have to include in the star and you need to change your MonoBehaviour to NetWorkBehaviour. Also just instantiating your object is not enough to show up in multiplayer for others. use Network.spawn(gameobject); after instantiating it. You also may have to add NetworkIdentity - object to your gameobject in the inspector. Aand you’re talking about projectile that needs to be moving so you may need NetworkTransform to update it’s movement or you could give it certain parameters to move in certain way, when it is spawned/instantiated. = that projectile-gameobject’s script Start()

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
 
 public class earthwall : NetworkBehaviour
 {
 
     public GameObject Earthwall;
 
     private float fireStart = 0f;
     private float fireCooldown = 0.1f;
 
 
     // Use this for initialization
     void Start()
     {
 
     }
 
     // Update is called once per frame
     void Update()
     {
 
         if (!isLocalPlayer)
         {
             return;
         }
         if (Input.GetButton("Earth2"))
         {
 
             if (Time.time > fireStart + fireCooldown)
             {
                 fireStart = Time.time;
 
                 GameObject InstantiatedProjectile =
                 (GameObject)Network.Instantiate(Earthwall, transform.position, transform.rotation, 0);

                  Network.spawn(InstantiatedProjectile); // spawn the object for other players to see it.
 
             }
         }
     }
 }