Getting a error cant understand why

Hello.

You can simply use it like so:

ActorDistance = PlayerCharacter->GetDistanceTo(OtherActor->SpotlightPicker);

The target pin in blueprints you see is just an instance of an object on which you call a function, so in this case it’s PlayerCharacter.

Hope this helps.