What do you want to achieve? Textwrapping on certain letters, i dont want the holes so im trying to make my own textwrap system
What is the issue? I need to find on which symbol do i have to fire the function to create a newline
What solutions have you tried so far?
local function replace_char3(pos, str, r)
return table.concat{str:sub(1,pos-1), r, str:sub(pos+1)}
end
local position = game:GetService("TextService"):GetTextSize(Text,script.Parent.MainFrame.DialogueText.TextSize,script.Parent.MainFrame.DialogueText.Font,Vector2.new(0.95,0.9))
position += Vector2.new(1,1)
Text = replace_char3(position.X,Text,"\n")
Your script runs perfectly fine when I test it. Although the character in the index you pass(in our case 40) disappears. I’m asking you if the issue is related to this, or that for you a newline isn’t created at all.