Trying to cast a variable from object to object

trying to cast a variable from actor to object and can not figure out where i have gone wrong.


they are lightshot screen shots.

Since you have already set ‘Track’ as a variable, you don’t actually need to cast. Just drag directly out of your ‘Track’ variable and get the score integer.

this helped but it will now only cast 0 to the track.

Can you explain more?

what happens is after i did what you said to do i got no errors. so i went to the track blueprint and printed out the score. it keep saying zero now. but when i check the other blueprint i casted the score to it worked.

That’s because the reference you set, is technically an empty actor. You’ll need to reference the instance of the actor you want the data from.

Check out my other answer on casting for more info: