#help with TMP

1 messages · Page 1 of 1 (latest)

haughty cradle
#

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;
}```

wild scarab
#
  1. speedText is a text object. you need to set its text property
  2. ToString is a method. You need to put parentheses behind a method name in order to invoke it.