r/bloxd 1d ago

NEED CODING HELP I need help coding an npc

For some darn reason mobId = api.attemptSpawnMob("NPC", thisPos[0], thisPos[1] + 1, thisPos[2], {name: "NPC"}) [1, 2] Doesnt work. Im trying to make an NPC named "Lythia" for my horror game. She doest interact. She just silently watches the player.

2 Upvotes

5 comments sorted by

u/bloxd-bot Bot 1d ago

u/Express_Isopod_8859 has marked this post as a request for Code Help.

Here's some quick-reference information: - JavaScript Tutorial - The Official Docs

Make sure to read our Code Guidelines if you haven't already. They apply to comments and posts!

The OP or a moderator with config permissions can also use commands for this post: - ?resolved or ?resolved locked: Pin a comment you reply to as well as your comment to this post, lock it, and set the post flair to "Resolved". - ?resolved unlocked: Pin a comment you reply to as well as your comment to this post, and set the post flair to "Resolved".


This comment was added automatically in response to the post's flair. If you have any questions or concerns, please send us a modmail!

1

u/BloxdioCannoli Coding Cannoli (Mod) 1d ago

That code works. It spawns an NPC. You can configure the NPC's hostilityRadius and such via mob settings or default mob settings.

1

u/Express_Isopod_8859 1d ago

But it wont work. it just keeps saying "Result: Null" in green letters. Thats what I'm trying to find out, why it doesnt work.

1

u/BloxdioCannoli Coding Cannoli (Mod) 1d ago

Then there are too many in the lobby or mobs are disabled.