Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a better way to smoothy tween FontSize?

Asked by 8 years ago
Edited 7 years ago

I'm aware you can't actually tween the FontSize itself, so instead I tried using TextScaled while just tweening the size of the TextLabel. It... kinda worked, but wasn't a result I was completely happy with. You can see the implementation of the method here. It kinda jerks around a little...


I'm only asking this question because I've seen smooth FontSize transitions before, like in Phantom Force's countdown timer (not sure how smooth that will look in Gyazo, but obviously it's much smoother in-game).

I'm not sure if doing this is possible any other way, or maybe this is the only way and I'm just screwing it up. Either way, if anyone has any smoother method of "tweening" the FontSize, I'd appreciate it.

Edit:

Here's my code for the demonstration showed in the GIF, just for testing purposes. "test" is the Frame the TextLabel is inside of. The TextLabel has TextScaled enabled, with a size of {1, 0}, {1, 0}.

for i = 300,0,-1 do
    test.Size = UDim2.new(0.5,-i,0.5,-i)
    test.Position = UDim2.new(0.25,-test.AbsoluteSize.X/2,0.25,-test.AbsoluteSize.Y/2)
    wait()
end
0
You probably don't see it in Phantom Forces because it happens so quickly, but it's very likely that it jerks about there too. User#6546 35 — 8y
0
That's what I initially thought. I guess I'll just speed up the transition. ScriptGuider 5640 — 8y
0
Yeah, the phantom forces one doesn't actually appear to be tweening. If it does, it probably just goes through 2 different font sizes. TheDeadlyPanther 2460 — 8y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Hello world this [is](https://developer.roblox.com/en-us/api-reference/class/Mouse) a test?

this is a test

testing***

testtestm*

testingitalic

**hello***world*

Ad

Answer this question