#help with TMP
1 messages · Page 1 of 1 (latest)
speedTextis a text object. you need to set its text propertyToStringis a method. You need to put parentheses behind a method name in order to invoke it.
1 messages · Page 1 of 1 (latest)
i want to display a float called speed but i cant seem to get it to work ```
using TMPro;
public TextMeshProUGUI speedText;
public Rigidbody rb;
void Update()
{
float speed = rb.velocity.magnitude;
speedText = speed.ToString;
}```
speedText is a text object. you need to set its text propertyToString is a method. You need to put parentheses behind a method name in order to invoke it.