So I see many games with that, whenever your player types, every letter has a sound effect like a typewriter. But I can't seem to replicate it. Any help will be great!
✓ ANSWER ACCEPTED
When player types, how do every letter play a sound?
1 answer
✓ Accepted answer
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(k)
if UIS:GetTextBoxFocused() then
script.Sound:Play()
end
end)
Make this a LocalScript with a Sound named Sound parented to it.
EDIT:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(k)
if k.KeyCode == Enum.KeyCode.Enter then
for i = 1, string.len(UIS:GetTextBoxFocused().Text) do
script.Sound:Play()
wait(0.1)
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
It worked a different way than I was expecting...
It worked differently as I expected, but it works. I was expecting on when the player entered the chat, then it would play the sound depending on how many letters the player typed.
Okay, I'll add a version for what you need.