Third Person Character Object Reference is not compatible with Third Person Character Object Reference

I cannot link the Cast to ThirdPersonCharacter to the Health Variable because of the error “Third Person Character Object Reference is not compatible with Third Person Character Object Reference.” I have no clue how to get this to work, I’ve asked everywhere I could. Edit: I discovered I can do this connection anywhere except the UI. I’ve tried remaking the UI, moving the UI file, etc. Nothing works.

hi and welcome @itsstarving :slight_smile: my first guess… I think you aren’t using a ThirdPersonCharacter as your player… did you update the GameMode with a different pawn name? Just replace the cast with whatever your new pawn is…

I started a project using the Third Person setting, created a new level, and attempted to set up the health bar. This is the character I’m using, and I added the variable under it. Then, I created a new UI Element and named it HUD, created a progress bar and linked the percentage to a blueprint. That is as far as I got.

If there is anything else I can provide in terms of pictures, please let me know!

299884-unknown.png

mmm… just attach a print node to your GetPlayerCharacter and see what the screenprint is? as far as I can tell your cast setup is fine

What do you mean by a print node? I can’t find anything called print that I can attach to the GetPlayerCharacter.

299885-print.jpg

Thanks! Here is what I got…
It did indeed say ThirdPersonCharacter.
(I’m sorry for the late reply, I stepped away to have some dinner)

ok… “health” is a variable in your ThirdPersonCharacter BP?

It indeed is. Here’s a screenshot for reference.

I just discovered that I can do what I’m trying to do (attach the ThirdPersonCharacter to Health) in the level blueprint, but that won’t let me create a HUD, just use the health data for other things. So it works, but I’d like it to be shown on the HUD as well.

For some reason, there were other files that were conflicting (idk where they came from), but I deleted an asset group because I didn’t want to use it anymore and all of a sudden it works. So, no issue anymore!