How to make npc say something when proximity prompt click?

I’m not sure how to make this work?

I have this at the moment:

local PROMPT = script.Parent

PROMPT.Triggered:Connect(function(PLR)
	
end)
2 Likes

You can use :Chat to make this work.

New code:

--//Services
local Chat = game:GetService("Chat")

--//Variables
local NPC = workspace.MyCoolNPC --//Reference your NPC
local ProximityPrompt = script.Parent

--//Functions
ProximityPrompt.Triggered:Connect(function(player)
	Chat:Chat(NPC.Head, "hi ".. player.Name, Enum.ChatColor.White)
end)
2 Likes

Hi,

I would rather have it be speech bubbles, is that possible? :slight_smile:

1 Like

Those are speech bubbles. You should probably try the code first.

4 Likes

It’s literally speech bubbles

2 Likes

I tried it now and it works like intended, thank you so much!

2 Likes

… why you just repeat? Look:

1 Like

Will this be shown in the chat window?

2 Likes

No, it just shows the speech bubble.

1 Like

No problem. If you have any more questions, feel free to ask.

1 Like

Ok thank you so much!
I didnt know that!

3 Likes

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