# Get players who have the custom item with item\_component

**URL:** <https://forums.unrealengine.com/t/get-players-who-have-the-custom-item-with-item-component/2692904>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite\
**Created:** [January 17, 2026, 3:36pm UTC](https://forums.unrealengine.com/t/get-players-who-have-the-custom-item-with-item-component/2692904 "2026-01-17T15:36:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoshiyuki\_101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yoshiyuki\_101](https://forums.unrealengine.com/u/Yoshiyuki_101)\
**Post date:** [January 17, 2026, 3:36pm UTC](https://forums.unrealengine.com/t/get-players-who-have-the-custom-item-with-item-component/2692904/1 "2026-01-17T15:36:42Z")

</div>

```auto
I'm trying to get players who have a custom item with item_component, but it's not working.
I want to know how to get players who have a custom item with item_component. 

var InventoryToAgent : [inventory_component]agent = map{} 

    OnSimulate<override>()<suspends>:void =

        if (Playspace := Entity.GetPlayspaceForEntity[]):
            Players := Playspace.GetPlayers()

            for(Player : Players, FC := Player.GetFortCharacter[]):
                if(ItemComp := Entity.GetComponent[item_component]):
                    Print("ItemComp")
                    if(ParentInv := ItemComp.GetParentInventory[]):
                        Print("ParentInv")
                        if (Agent := InventoryToAgent[ParentInv]):
                            Print("Agent")
                            if(FC = Agent.GetFortCharacter[]):
                                Print("FC")

```

---

<div class="post-metadata">

**Author:** ![EV\_WAKA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EV\_WAKA](https://forums.unrealengine.com/u/EV_WAKA)\
**Post date:** [April 23, 2026, 4:56pm UTC](https://forums.unrealengine.com/t/get-players-who-have-the-custom-item-with-item-component/2692904/2 "2026-04-23T16:56:05Z")

</div>

Super late lol but I think you’d have to create a custom item prefab entity first. Then get the player entity, then get (PlayerInventory := GetComponent[inventory\_component]), then AllItems := PlayerInventory.findallitems[], then cast them to your custom item prefab entity CustomItemsArray := AllItems[custom\_item\_prefab], then check if CustomItemsArray \> 0 to result in true/false. If true, add that player to an array of players who have this item using a ‘for loop’.
