How to make dialog with without clicking on the start?c

I don’t fully know how to make dialogs, which comes out to that I don’t know how to make the dialog on a player, for everyone to see, and it need to happen on a chat message.

I have tried doing this:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	
	player.Chatted:Connect(function(msg)
		local dialog = Instance.new("Dialog", player:WaitForChild("Character"):WaitforChild("Head"))
			dialog.ConversationDistance = 100
			dialog.GoodbyeChoiceActive = false
			dialog.InitialPrompt = msg
			dialog.InUse = true
		
	end)
	
end)

But it doesn’t seem to work…
If you can help me, feel free to reply, thanks.

2 Likes

It seems like you wanted to make chat bubbles alive again.
You should try using the Chat service.

local Players = game:GetService("Players")
local Chat = game:GetService("Chat")

Players.PlayerAdded:Connect(function(player)
	
	player.Chatted:Connect(function(msg)
	 Chat:Chat(player.Character,msg,"White")	
	end)
	
end)

bumpy de bump does it work boi?

I just came back from campfire…

Also it worked