Rich text not working properly [SOLVED]

The issue is that it doesnt display at all and just shows the rich text code for some reason.

Code:

local function ChooseFPSColorValues(CurrentFPS)
	
	for MinFPS,ColorVal in pairs(FPSColors) do
		
		print(MinFPS)
		
		if CurrentFPS >= MinFPS then
			
			return ColorVal.R * 255,ColorVal.G * 255,ColorVal.B * 255
			
		end
		
	end
	
end

while wait(1) do
	
	local R,G,B = ChooseFPSColorValues(frames)
	
	Display.Text = [[<stroke color="rgb(0,0,0)" joins="round" thickness="0.75" transparency="0">FPS: ]] .. [[<font color="rgb(]] .. tostring(R) .. [[,]] .. tostring(G) .. [[,]] .. tostring(B) .. [[)">]] .. tostring(frames) .. [[</font></stroke>]]
	
	frames = 0
	
end

When you’ve solved your own solution, please type out what your solution was as a reply, and mark it as the solution. This helps others who encounter the same issue later on!

3 Likes

I had to math.floor the R G and B variable

1 Like

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