# Can Playcanvas handle multiple NPC in one scene?

**URL:** <https://forum.convai.com/t/can-playcanvas-handle-multiple-npc-in-one-scene/5296>\
**Category:** Web SDK & Embeds\
**Tags:** playcanvas, question\
**Created:** [October 9, 2025, 11:56pm UTC](https://forum.convai.com/t/can-playcanvas-handle-multiple-npc-in-one-scene/5296 "2025-10-09T23:56:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dylan](https://forum.convai.com/u/dylan)\
**Post date:** [October 9, 2025, 11:56pm UTC](https://forum.convai.com/t/can-playcanvas-handle-multiple-npc-in-one-scene/5296/1 "2025-10-09T23:56:35Z")

</div>

Hello,  
I have one Convai avatar working great in PlayCanvas.  
Can Convai & Playcanvas handle multiple NPC in one scene?  
The NPCs are not conversing with each other, they are in separate areas.  
My concern is that when I press L to talk, how does Convai know which Avatar I am talking to? Do the Avatars have proximity or a fall-off?

---

<div class="post-metadata">

**Author:** ![dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dylan](https://forum.convai.com/u/dylan)\
**Post date:** [October 10, 2025, 9:39pm UTC](https://forum.convai.com/t/can-playcanvas-handle-multiple-npc-in-one-scene/5296/2 "2025-10-10T21:39:27Z")

</div>

When adding an additional a character and duplicating the convaiNpc script with the new character ID, I got one error (Uncaught SyntaxError: Identifier ‘timeoutId’ has already been declared) which I fixed by using timeoutId2 for the second NPC.

However when I run. Only the second NPC talks, and he is re-positioned back at 0,0,0 on top of the first NPC. They both animate at the same time.

My guess is that the PlayCanvas Convai scripts have not been updated to allow multiple NPCs?

---

<div class="post-metadata">

**Author:** ![Saurav](https://yyz2.discourse-cdn.com/flex004/user_avatar/forum.convai.com/saurav/32/2514_2.png) [@Saurav](https://forum.convai.com/u/Saurav)\
**Post date:** [October 10, 2025, 11:36pm UTC](https://forum.convai.com/t/can-playcanvas-handle-multiple-npc-in-one-scene/5296/3 "2025-10-10T23:36:16Z")

</div>

Its not readily available using convai web sdk as of now but you initialise convaiClient based on proximity and or have a currentActiveClient which changes based on proximity ( if both are initialised in the beginning). Will work on this.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex004/uploads/convai/original/1X/e60ef96aa7334c5ccf6682f6c6dbc20fcfa96b49.png) [@system](https://forum.convai.com/u/system)\
**Post date:** [November 9, 2025, 11:36pm UTC](https://forum.convai.com/t/can-playcanvas-handle-multiple-npc-in-one-scene/5296/4 "2025-11-09T23:36:40Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
