Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Does anybody know how to make a part talk when you press a button?

To go more in-depth, I want to be able to press a button, to make a different part speak, that I could press somewhere else. Like from a one-sided window, and make a camera speak. Anybody know how?

function onClicked()
	script.Parent.Parent.Papers
game:GetService("Chat"):Chat(Part.Character,'PAPERS, PLEASE')
end

I tried my best but it still doesn't work...

1 answer

✓ Accepted answer

Okie, here's what you need to do I think:

local PartSpeaker = game:GetService("Chat")
local ClickDetector = script.Parent.ClickDetector
 
function onClick()
     PartSpeaker:Chat(script.Parent.Parent.ChatPart, "PAPERS, PLEASE")
end

ClickDetector.MouseClick:connect(onClick)

Insert two parts into Workspace, then insert this script into one of the parts. Name the other part "ChatPart". Go here to test it out: https://www.roblox.com/games/3899945240/Test-for-Scripting-Helpers-Answer

1 comment

0

Thank you so much! I really appreciate it!

This discussion is preserved as it was. New answers, comments, and votes are closed.