For a simplistic approach without further considerations :
-
in ScoreSystem, get a reference to the ball using node
GetActorFromClass
and withBP_Ball
as a filter. Store the result in your “As BP Ball” variable. -
In GoalPost, connect OtherActor pin to the cast.
Should be enough to make it work. If you are still getting errors from the widget saying “accessed none while trying to read As BP Ball”, try adding a delay (1-2seconds) in widget Construct before calling GetActorFromClass and storing the result.