GetTextBoundsAsync outputs the wrong result

Hello, I’ve had this issue for a few hours now but I can’t seem to figure out why this happens? When using GetTextBoundsAsync in a script, it returns a completely different value than when I manually print it out via the command bar.

Output from the script:

Output from the command bar:

Any help on this would be appreciated

It seems like it works fine, like it should.