SWAGTEXT - Custom RichText Module

a line in the code is:

		if l.Name == "SWAGTEXT_WORDFRAME" or l.Name == "SWAGTEST_LETTERFRAME" then

i don’t know if this is on purpose :sob: (probably not), but it really did mess up the cleartext function for me, so if you have this issue, just change that line of code to:

		if l.Name == "SWAGTEXT_WORDFRAME" or l.Name == "SWAGTEXT_LETTERFRAME" then
1 Like

oops, probably did it by accident, should be fixed now
lmk if you have any more issues

yeah, i don’t know if this just happens to me, idk what i’m doing, but the module also has a state persistence issue. here’s an example: “Wow, a red apple, this’ll keep the <color=#FF2C2C>doctor</></> away.” as you can see, I color tagged and bolded the word “doctor” in that string of text with bold and a red color. But, when you interrupt the animation while it’s on the word “doctor” and assigning it’s letters to be a red color (in a red color state), by interruption I mean calling another AnimateText with a string of text like: “Meh, a yellow banana, good for <color=#FDFD96>potassium</></> though.”, SwagText picks up right where it left off state-wise (red color state), applying the red color to all of the Banana text until it hits another tag like the “potassium” word or the end of the string of text.

i guess you can do something like this (worked for me):

state = {}
table.insert(state, default)
word = {} -- reset word tracking just in case
wordLocation = nil

we reset the internal state to avoid this state persistence issue, pretty hard to explain, but if you got somewhat of my example, you can try to replicate this issue and see for yourself

1 Like

issue should be fixed, please update and let me know if there are further issues