# Casting failed between two widget blueprints

**URL:** <https://forums.unrealengine.com/t/casting-failed-between-two-widget-blueprints/410283>\
**Category:** Blueprint\
**Tags:** casting, cast-failed, unreal-engine, cast, question, Blueprint\
**Created:** [November 22, 2017, 6:57am UTC](https://forums.unrealengine.com/t/casting-failed-between-two-widget-blueprints/410283 "2017-11-22T06:57:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a311757d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a311757d](https://forums.unrealengine.com/u/anonymous_user_a311757d)\
**Post date:** [November 22, 2017, 6:57am UTC](https://forums.unrealengine.com/t/casting-failed-between-two-widget-blueprints/410283/1 "2017-11-22T06:57:59Z")

</div>

So, I have two widget blueprints(GameWin & MainMenu) What I am trying to do is to make a leaderboard for the player’s scores. In the MainMenu Widget, I have 3 variables(Top Score1, Top Score2, and Top Score3) I need to compare these to the variable Score inside the GameWin widget. What I need to do is get the Top score variables into the GameWin blueprint, I’m trying to do this through casting(Don’t know if this is the right way) but whenever I try to cast it, it always fails. See casting in the pic below:

 ![221070-screenshot-31.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/3/c/a3c33476dbb85d1d9dccfadcc62037032a35fde5.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 22, 2017, 8:07am UTC](https://forums.unrealengine.com/t/casting-failed-between-two-widget-blueprints/410283/2 "2017-11-22T08:07:53Z")

</div>

_GetAllActors/WidgetsOfClass_ return the correct object type already. No need to cast here, as the helpful message states.

The cast may be failing because the object does not exist.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a311757d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a311757d](https://forums.unrealengine.com/u/anonymous_user_a311757d)\
**Post date:** [November 22, 2017, 5:31pm UTC](https://forums.unrealengine.com/t/casting-failed-between-two-widget-blueprints/410283/3 "2017-11-22T17:31:40Z")

</div>

Works like a charm, thanks.
