# How to read/write variable of HUD class from Level blueprint?

**URL:** <https://forums.unrealengine.com/t/how-to-read-write-variable-of-hud-class-from-level-blueprint/284341>\
**Category:** Blueprint\
**Tags:** variables-communicat, unreal-engine, Blueprint, question\
**Created:** [May 27, 2014, 9:01am UTC](https://forums.unrealengine.com/t/how-to-read-write-variable-of-hud-class-from-level-blueprint/284341 "2014-05-27T09:01:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2f116e5b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2f116e5b](https://forums.unrealengine.com/u/anonymous_user_2f116e5b)\
**Post date:** [May 27, 2014, 9:01am UTC](https://forums.unrealengine.com/t/how-to-read-write-variable-of-hud-class-from-level-blueprint/284341/1 "2014-05-27T09:01:09Z")

</div>

Gone through : [https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html](https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html)

Created ‘CurrentScore’ variable (public) in HUD class to draw text on screen

 ![7138-currentscore_defined+in+hud+class.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/d/7ad5bab4a23dfce3882ec2bb8f0235019717c64d.jpeg)

Created object variable in level blueprint pointing HUD class to set ‘Currentscore’ variable, but its not working

 ![7139-levelblueprint.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/6/50651e82eb128208c053851edec24341eac83de2.jpeg)

Where am I going wrong?

---

<div class="post-metadata">

**Author:** ![DizzyWes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DizzyWes](https://forums.unrealengine.com/u/DizzyWes)\
**Post date:** [May 28, 2014, 4:25pm UTC](https://forums.unrealengine.com/t/how-to-read-write-variable-of-hud-class-from-level-blueprint/284341/2 "2014-05-28T16:25:06Z")

</div>

Hey,

Try adding this in your Level Blueprint:

 ![7235-gethud.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/0/440c47cb45c9e93954faff1f92695b60233d6adf.png)

The GetHUD node should Cast To your HUD Blueprint, from there you can drag off and access and set variables in it.

-W

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2f116e5b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2f116e5b](https://forums.unrealengine.com/u/anonymous_user_2f116e5b)\
**Post date:** [May 29, 2014, 9:33am UTC](https://forums.unrealengine.com/t/how-to-read-write-variable-of-hud-class-from-level-blueprint/284341/3 "2014-05-29T09:33:30Z")

</div>

Thanks, a lot … Its working 🙂
