A few questions about npcs

I have three or so questions about npcs so here they are:

1. How do I make an npc teleport every player in the server when they all finish the dialog?

2. How do I change the dialog box to be cooler and match the rest of my game instead of the roblox default?

3. How do I put a hat or hair on the npc?


Do you use the default DialogChoices? If so, then I suggest looking at DialogChoiceSelected.

There are only 3 styles available. Purpose and Tone affect the style. I suppose.

Import it from Toolbox or the Avatar and then place it into the NPC.


Thanks! Most of this will help but I don’t know how to use DialogChoice because I can’t script.

It’s pretty simple actually. You can set the dialogs in the Properties tab and connect the event with the player and the dialog choice.

1 Like

Ok, I’ll try that next! Thank you!

I tried this and I can’t figure out how to do it.

Dialogs shouldnt need scripting, unless they should do something. What cant you figure out?

I can’t figure out how to write the script that teleports the player, here’s what I have so far:

local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

local placeId = 7460180431 -- replace here

	if choice.Name == "Yes!" then

--placeid = 7460180431--

It’s in a local script under the dialog choice.

What part doesn’t work? Does it give any errors?

There are no errors, I don’t know what doesn’t work.

It does say that there is an infinite yield though, I forgot where.

Maybe this will help?

1 Like

Oh, ya. That’s probably the problem.

lol this is so off-topic now, how did we get from npcs to localscripts?

Nope, still doesn’t work as a script.

The script is for the npc so this is still on topic.

Ik. DialogChoiceSelected only works as a localscript.


Then how do I use it?!? Lua is so confusing…

Maybe put the localscript in the startercharacterscripts? Don’t give up!

Ok, I’ll put it there, do I still need a script under the DialogChoice?

I dont think so… :confused: Probably not?