I get an error when I run my project as a client.

Try creating the widget in your PlayerController class, instead of character.