So, I have barely any Lua experience, but there is a script which google can't find(or I can't), but is it possible to add a script that makes it so it will force a person to talk. This might not be possible, but I want to make sure before I give up. If this is breaking any rules, please comment and I will change(or delete if needed) this post. Thanks, nd887 P.S I want the message to show up in the chat, not just a Bubble.
You can use the ChatService
to accomplish this (Server Script):
local CS = game:GetService("ChatService") CS.SpeakerAdded:Connect(function(Speaker) script.Parent.Touched:Connect(function(part) local player = game.Players:GetPlayerFromCharacter(part.Parent) if player then if Speaker.Name == player.Name then Speaker:SayMessage("Hi", "All") end end end) end)
The ChatService's SpeakerAdded
event returns the speaker who entered the ChatChannel
(in this case, that channel is All
). From here you can use the SayMessage()
method, which requires a string for the speaker to say and a string for the name of the ChatChannel
to display the message in. A third, optional parameter is a dictionary that requires a string and a variant value.