Glitched text not working as expected

So like I got this glitch text loader which works good but when I try to reverse it, it gives me this strange result which is partially correct and near what I want.

Here’s the main function handling the text’s glitching

	StylesFunction['Linear'] = function(self)
		local FullString = self.FullString
		local index = 1
		local NormalString, HashedString = '',''
		for _ in do
			local ExpectedIndex = index + 1
			while index ~= ExpectedIndex do
				NormalString = FullString:sub(self.Reversed and #FullString-index or 1, index)
				HashedString = createHash(#FullString-index)
				self.TextDisplay.Text = self.Reversed and HashedString .. NormalString or NormalString .. HashedString
				print(HashedString, NormalString)
				index += self.Params.IndexLoop and math.round(math.random()-0.1) or 1


You can see it’s giving me few times randomly the encoded string and there are no sign of the actual string in there.

Here’s a gif of what it’s doing

If I was too vage, send me questions I’ll be here to respond.

If I understood you correctly, you want your normal string to appear from right to left when it is “reversed”. In this case the correct code will be:
NormalString = FullString:sub(self.Reversed and #FullString-index+1 or 1, self.Reversed and #FullString or index)