I’m trying to create a ‘splash text’ like Minecraft’s, but the tweening is choppy and delayed. I tried using the lerp function instead and using code someone else provided in another post here in the forum, but the tween is always choppy for some reason.
This is the code I’m using to tween the splash text:
Maybe it’s because I’m adding an easing direction even when the easing style is linear? But TweenInfo causes an error if I don’t provide an easing direction, even when using linear… and this happens even when I do use a different easing direction. I also tried setting the speed to 1 and 0.25, but this issue still occurs.
Please, how can I fix this?
2 Likes
How much/often are you playing the tween? Could it be that having a repeat count of -1 breaks tweening?
The repeat count of -1 is supposed to make it play forever, according to the Roblox wiki, and it does seem to work that way as I only ran those lines once (not in a loop or anything like that)
If you are not spamming a tween on the same object, then the issue is probably from the font itself with TextScaled
enabled (with that small of a size difference, the font size will (almost) appear the same size at some ranges).
If you go to your Explorer window and select the TextLabel under your Player’s PlayerGui, does the entire TextLabel’s rectangle hitbox itself size properly? If so, then the issue what I said above.
1 Like
Yeah, the hitbox sized properly. I disabled TextScaled though and now the text just doesn’t tween at all, no matter which text size I use (I tried using 14, the original size, and 100)
That is unforunately a limitation of the engine. Your best bet would be to render out the text as an image to have scaling at any given pixels, or to have the tween difference large enough to render out a non-choppy animation.
Edit: You also have to make sure that your X size is large enough to even fit the text in the first place. Try setting a larger number like 2 or make sure your text is smaller.
Oof, I’m using randomly chosen text for the splash text that is chosen out of a table inside a modulescript instead of just one text, so I don’t think I’ll be able to use images for this… I’ll try changing the tween difference though
Instead of changing the size of the TextLabel
, try to add a UIScale
inside that TextLabel
and tween the Scale
value instead, just to eliminate the possibility that it might just be the text being too large to fit within the X coordinate.
1 Like
That does make it a bit smoother, thanks! Another problem I just noticed btw, for some reason, after the tween ends, there’s a small delay before it plays again. Is there a way to remove this delay? (I didn’t set the delay option in the tweeninfo but I assume it’s set to 0 by default?)
Yes, it is 0 by default. It just might be the case of the tween difference is too small and/or the tween time is too large. Adding a UIScale to the TextLabel still has the same effect as manually scaling it.
Edit: If you are using the TextLabel’s Scale property to resize, try simulating it on a larger screen (like joining in-game) to confirm. It should be a lot smoother on a larger screen.
I managed to make it a little smoother by using the UIScale method you provided. The issue with the delay still occurs though, and I made the tween difference much larger + the tween time is set to 0.75, so I’m not rly sure whats causing this