Changing 3D text through script

So basically, I want a script that shows the number of “players_knights” in a 3D text, but I’ve searched everywhere and have tried everything but haven’t been able to get anything to work. so can someone help me make this script be able to show on to a 3D text? (oh and the most common problem I’ve had is "Cannot convert “int” to “String” " something like that.)

SCRIPT:

var players_knights = 20;

function Update() {

}

I seriously doubt that you’ve searched ‘everywhere’ and tried ‘everything’. I tried this, and it worked.

using UnityEngine;
using System.Collections;

public class Text : MonoBehaviour
{
	private TextMesh text;
	
	void Awake()
	{
		text = gameObject.AddComponent<TextMesh>();
		
		text.text = Time.time.ToString();
	}
	
	void Update()
	{
		text.text = Time.time.ToString();
	}
}