#Dialouge problems
1 messages · Page 1 of 1 (latest)
local function getCharBounds(char, textSize, font, frameSize)
return TextService:GetTextSize(char, textSize, font, frameSize)
end
heres what i should look like normally
vs when the device is more tinier than PC screens.
end
end)
end
...
end
end
...
end```
so in other words, you want this to work with TextScaled?
i dont think you can, you're going to have to write your own scaling
huh.. I guess what I can only do now is try to make a LocalScript/Module that changes a TextLabel's TextSize simutainously if the size of the Parent has changed? Or is there a better way to do so, since that's what i can only think of 💔
Since TextService is dependant on the TextSize in my case, that's the only solution that might work out for me but im not sure
set textsize according to the size of the textbox
you could factor in text length too
Ill check it out, ill go play other games that has done the same dialouge things and find out if this isnt just a issue with me
Found out it's an issue everywhere thank god
indeed
Ill probably have to check out DevForums to find out on how to fix this
i'd imagine autoscale lite having something for text scaling in it
yeah.. no i don't think the textscaling on autoscale works at all
does work when the screen size is small
i didnt say to use it, i said it has something for text scaling in it. aka read the source code for it and take how they replace .TextScaled
i'm assuming it has something for it, it might be lazy tho
https://devforum.roblox.com/t/calculate-textscaled-size/378577/7
Doing this calculation yourself like that isn’t ideal because it means that every dialog will have a different font size, which results in poor UX. In addition, you’ll still have cases where if a dialog message is too long the resulting text will be unreadably small.
You should pick a font size you know will fit every message you’ll display - either a static size in pixels, or setting the font size based on the height of your dialog bubble using a script. In the future we might add more ways of setting the text size, but until then you have to use scripts to calculate it.
~ Roblox Staff
Doing this calculation yourself like that isn’t ideal because it means that every dialog will have a different font size, which results in poor UX. In addition, you’ll still have cases where if a dialog message is too long the resulting text will be unreadably small. You should pick a font size you know will fit every message you’ll displ...
I found out in AutoScale Lite they used an UITextSizeConstraint
they probably set the constraints in code
yeah, they do automatically set it, in Default it would be 100
damn almost 400 lines for dialogue 💀
It's a dialouge with custom animations in it
it would be simple if it was just a type-writer effect
are you using rich text
hm damn, you must have a lot of effects then
its TextService from what i know so far
thats nothing
only reason its not 1000 is probably coz it not finished and battle-tested yet
I wouldn't have any issues if it was just like InkGames where it can set the TextSize automatically (I asumme), but never change it once the screen resolution changes again untill the next line
But i don't know how they did that so that's what im just trying to figure out
you mean how the entire text doesn't grow/shrink as it gets typed out?
Yeah, TextService only relies on the TextSize, but i cant set the TextSize without trying to figure out on how to set it before TextService grabs their sizes and it gets typed out
invisible textbox 
yo what's that portal in the back
lowkey I don't even know what your problem is but good luck
look at the screenshots
and see how the text never scales
oh you mean how it doesn't fit inside the textbox thingy
yeah
you could like figure out how much one letter takes up then multiply by the number of letters but there's probably a smarter way to do it
also are you using a textlabel or what is that
yeah its a text label
can't you just say textlabel.TextScaled = true then?
hello there.
** You are now Level 1! **
sup
hello realsword
he's using multiple textlabels I assume
especially for effects like shaking
then why not do textscaled = true on all of them
That wont work if its a Spam of Textlabels
and not a type-writer effect
its a letter by letter textlabel calculated by TextService's GetTextSize which relies on TextSize (Will never change even with TextScaled on btw)
so im confused on how Ink Games did it
oh textservice makes it so you can't change it?
TextService relies on TextSize
So even if you have TextScaled On
it will Get the TextSize instead
@hearty condor I found a forum page that talks about your exact problem
Hey all, so I’m trying to make a UI that scales to the size of the Player’s username, but I am using scaled text, so I’m wondering how to make TextService:GetTextSize() work with scaled text. To my knowledge TextLabel.TextSize doesn’t matter if you are using TextScaled. Is it even possible?
and this guy is changing the size based on the amount of letters like I suggested. so that's probably the idea here.
thats for scaling the UI,
My problem is Scaling the Text
well I was gonna say make the UI fit the text but instead you want the text to match the UI
I see, Some people used Frames as a reference of how the Text should be