Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Make a speach bubble appear on an object when clicked.#?

Asked by 3 years ago

i dont know if i am being brain dead or sum but i cant seem to figure out how to make a brick speak to me when i click it. Please can someone help?

1 answer

Log in to vote
3
Answered by
appxritixn 2235 Moderation Voter Community Moderator
3 years ago

An option you have is to use ClickDetectors and the Chat service.

To detect a player clicking the part, you should use a ClickDetector.

As for making the part talk to you, Chat service can make a speech bubble appear.

local ClickDetector = script.Parent -- Location of the ClickDetector
local part = ClickDetector.Parent -- Location of the part
local chat Service = game:GetService("Chat")

clickDetector.MouseClick:Connect(function(player)
    chatService:Chat(part, "Message", "Color") -- Replace "Color" with an actual color such as "Red"
end)

If you want the player to have dialog options to communicate with the part, you should use Dialog.

Ad

Answer this question