Sorry I can't make a script, I know nothing on how to make a sound play when you say something in chat.
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 game.Players.ChildAdded:connect(function(plr) 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 game.Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(msg) Sound:Play() end) end)
idk Your answer body must be at least 5 characters long. Think of more to say!
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)