Hi, I am new and just learning. I tried to apply the tutorials, but unfortunately I can’t match them to my problem.
I want to add a scoring system that will count a point every time a ball is thrown into the box.
The answer is to cast to your ball bp instead of the character. Overlap events will be triggered for any overlapping actor (subject to collision settings), so the cast is a way to both filter out overlapping actors you are not interested in as well as providing a reference to the one you are interested in (when that is the thing overlapping).
You appear not to need the reference here, so the cast is purely for filtering out other (non-ball) actors that might overlap with your box/goal/thing.
You (probably) don’t want to store the score on the ball. Your own GameState class would actually be the most sensible place for it, but if you just want to get it working (and aren’t planning to make this multiplayer) then the way it is done in that tutorial will work: Put the score var on the character and wire up the widget the same as in the tutorial, the only thing you need to change is the cast in the overlap.
If you really did want to put the score on the ball, you could get a ref to it with the Get Actor of Class node, but if you destroy and respawn the ball you will A) loose the score every time, and B) need to update those references every time to avoid runtime errors.