Not sure how to go about this, but I think this would be cool to add to my game, and let people pick from a list of voices or upload one (but uploading might be impossible since roblox hasnt allowed public audios in ages)
The title is a bit hard to explain, but basically, I want to make text appear one character at a time with a small snippet of audio playing each letter that appears. Like the dialogue in Undertale.
Would this be possible?
I assume you are refering to the sound which gets played each time a new character appears, this is quite easily feasable by first having a index which correlates to the value of the sound and allowing players to pick them at the start or in the settings.
Then just play the sound. Also to further elaborate this is called the typewriter effect, you can find many videos on the topic on youtube and the devforum.
local function getPitchFromChar(char)
local ascii = string.byte(char)
return .1 + (ascii - 65) * (0.4 / (122 - 65))
end
local frequency = 2
local counter = 0
for i = 1, #newText do
local char = string.sub(newText, i, i)
Dialogue.Text = string.sub(newText, 1, i)
counter += 1
if not string.match(char, "%s%p") and (counter % frequency == 0) then
local blip : Sound = game.ReplicatedStorage.Blip:Clone()
blip.Parent = playergui
blip.Pitch = getPitchFromChar(char)
blip:Play()
Debris:AddItem(blip, blip.TimeLength + 1)
end
task.wait(0.05)
end
Make a custom speech bubble system (or take one from resources), you cannot do that with roblox’s speech bubbles unless you edit them yourself. You can edit roblox’s old (ChatService) system, but I am not certain about the new system (TextChatService).
I figured, I’ll take a stab at making a custom speech bubble system but I don’t… know how i could do that. theres probably some models or tutorials out there though. thanks!
This holds some minor information here and there, you can take some from it.
If you want to use TCS check this post out, mainly onBubbleAdded will be useful then try to edit the MaxVisibleGraphemes. I am sure you can make the typewriter sound work without making a custom chat system, but I cannot say the same about the actual effect of characters popping into existence.
Final post I will make for now, the following post tells you where the script is located for chat bubbles, if you edit this / overwrite this you can implement the type writer effect.