# Firearm

Before networking a firearm, complete the [Firearm](https://akila.gitbook.io/fps-framework/tutorials/character/firearm) setup in the base FPS Framework first ensure it works correctly there, then follow the FPSF Pro networking steps to network the weapon.

Now, you can follow the same process used for the **FPS Controller** and **Inventory**. Simply right-click on the **Firearm** component, then select **Setup > Network Components**.

<figure><img src="https://512600823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLQgz9gGwkU5HhRwKT3te%2Fuploads%2Fu0WmncjtNmxezSk3yZeI%2FScreenshot%202025-10-10%20200923.png?alt=media&#x26;token=a9c790c3-a240-40d2-bb02-f94c334e67e2" alt=""><figcaption></figcaption></figure>

This will add NetworkFirearm component which has 2 fileds, Network Pickable and Network Projectile. \
Let's starts with Network Projectile. Find the default Projectile prefab or your own projectle, right click Setup > Network Components then make it a prefab and assgin it to Network Projectile field.

<figure><img src="https://512600823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLQgz9gGwkU5HhRwKT3te%2Fuploads%2Fk8yM5pPgB2DX2CKmDxKG%2FScreenshot%202025-10-10%20201223.png?alt=media&#x26;token=f281bb13-0fbd-4a7c-b1cf-b06339f76e08" alt=""><figcaption></figcaption></figure>

For NetworkPickable see [Pickable ](https://akila.gitbook.io/fps-framework/tutorials-pro-only/systems/interactions-manager/pickable)for Pro asset and assgin it to Network Pickable.

## Multiplayer View

If you’re using custom meshes or animations for other players to see, attach the **PlayerItemsLocomotion** component to handle their synchronization properly.

{% hint style="info" %}
This component is designed for setups that use a custom character model with a unique rig and animation set, separate from the firearm animations used in the **Inventory** system.
{% endhint %}

<figure><img src="https://512600823-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLQgz9gGwkU5HhRwKT3te%2Fuploads%2FFOs0Ue0RdVPZCjD4r7rF%2FScreenshot%202025-10-10%20202507.png?alt=media&#x26;token=d9d05d6c-ad81-40db-9804-576787e9d494" alt=""><figcaption></figcaption></figure>

The **TargetItem** field should reference the prefab of your networked firearm. This allows the component to detect when the player is holding that specific item. If the player is holding it, the firearm’s mesh becomes visible to other players, while the active weapon in the inventory is hidden.

Other fields are self explantory:

* The **PlayerAttachmentsManager** is a centralized manager that handles enabling and disabling items across the network. Attach it to the player object this allows weapons to check whether they should be active or not based on the manager’s state.
* The **CasingEjectionPort** defines the point where shell casings are ejected. Adjust its position and rotation to match the location and direction of your custom mesh for accurate visual alignment.
* The **LocomotionAnimationLayer** specifies which animator layer the weapon controls. Its weight is automatically set to **0** when the item is inactive and to **1** when the item becomes active.
