Still have questions? Join our Discord server and get real time help.
2

# How do I make it so when you say something in chat a sound will play?

Sorry I can't make a script, I know nothing on how to make a sound play when you say something in chat.

0
Edited 4 months ago

Under the script is instructions on how to set it up

local Sound = workspace.Sound
function onChatted(msg, recipient, speaker)
local playertalking = string.lower(speaker.Name)
msg = string.lower(msg)
local message = Instance.new("StringValue")
message.Parent = workspace
message.Value = "put the message in here"
if (msg == string.lower(message.Value)) then
Sound:Play()
end
end
plr.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, plr) end)
end)


in the quotes where it says put the message here you will put whatever the phrase or word is. You also need a sound in the workspace named Sound. Using the properties tab, you will insert your sound id. It will automatically play once this is done and the message is chatted!

if you want the sound to play any time someone chats use this:

local Sound = workspace.Sound
player.Chatted:Connect(function(msg)
Sound:Play()
end)
end)

0
Thanks, but how would I make it so if you say anything the sound will play? RenDevelopment 15 — 4mo
0
I will mess with the script and let you know if I can get it to do that peytonallen920 66 — 4mo
0
ok that new script should make the sound play anytime someone chats peytonallen920 66 — 4mo
1
thanks RenDevelopment 15 — 4mo
0

idk Your answer body must be at least 5 characters long. Think of more to say!

-1

Serverscript:

game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local sound = Instance.new("Sound")
sound.Parent = workspace
sound.SoundId = "" -- Sound Id
sound.Name = "IDK" -- Sound Name
sound:Play()
wait(sound.TimeLength)
sound:Stop()
sound:Destroy()
end)
end)

0
Wow You Just Copied My Awnser Harry_TheKing1 180 — 4mo
0
No? Official_DuckyYT 55 — 4mo