Rich Text doesn't seem to work with a script

Hello, this script doesn’t work. It doesn’t change the colors of the text and doesn’t bold it either. RichText is enabled on the text label. (I’m using the hex values of the colors, so that’s why there’s a # before the break)

local OldIntensityColor = _GameLib.Config.DifficultyColors[math.floor(OldIntensity)]:ToHex()
	local IntensityColor = _GameLib.Config.DifficultyColors[AbsDifficulty]:ToHex()
	
	local FinalString = "<b>"..PlayersSurvived.."/"..PlayersTotal.."</b> Survived: "
	
	if GameFolder.DifficultyLocked.Value then
		FinalString = FinalString.."Intensity is locked at"
		FinalString = FinalString.."<b><font color=\"#"..OldIntensityColor.."\">"..(math.round(OldIntensity * 100) / 100).."</b>"
	else
		FinalString = FinalString.."<font color=\"#"..OldIntensityColor.."\">"..(math.round(OldIntensity * 100) / 100)
		FinalString = FinalString.." ("..(IntensityDifference >= 0 and "+" or "-")..IntensityDifference..")</font> ->"
		FinalString = FinalString.."<b><font color=\"#"..IntensityColor.."\">"..(math.round(Intensity * 100) / 100).." (".._GameLib.Config.DifficultyNames[AbsDifficulty]..")</b></font>"
	end

use ’ ’

e.g.

I want the <font color='#FF7800'>orange</font> candy.
1 Like

Okay, turns out the order of the tags matter, as swapping the /bold and /font tags on the second to last line seems to work, thanks for helping, though.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.