How to make the raycast go from global to global positions?

The raycast I make goes only by “addition position”(or something local) from starting point.
The problem is with PlayerListener.transform.position or PlayerListener.transform.localPosition
I tried both of them…

the raycast takes the start position, and direction. You should write

//PlayerListener.transform.position - transform.position = direction from transform.position to PayerListener.position
Physics.Raycast(transform.position, PlayerListener.transform.position-transform.position, out hit)

Raycasts use a starting point and a direction. You want Physics.Linecast.

if (Physics.Linecast(transform.position, PlayerListener.transform.position, out hit) 
    // ...

@jstopyraIGG Ty man