Need help with teleportation and line of sight

So in the top down template I made a vision cone for the character line of sight and made a teleport for them to go to where they pressed rmb and mouse position. I wanted to make it so the character couldn’t teleport if there mouse wasn’t in line of sight but couldn’t find out how.

Maybe you’ll need Cone Angle / 2, depending on how the cone is constructed.