How to change owner

Hi,

I cannot seem to wrap my head around how to dynamically change an Actor’s owning player, as that is essential for a capture the flag game

AActor::SetOwner();