Changed it to this and it works fine
def TurretLinkerToHelicopter(heli, player)
{
var tagOrigin = heli.gettagorigin("tag_player_attach_left");
var turret = gsc.spawnTurret( "misc_turret", [ tagOrigin[0], tagOrigin[1], tagOrigin[2] + 30] , "sentry_minigun_mp" );
turret.setModel("weapon_minigun");
turret.maketurretoperable();
turret.makeUsable();
turret.linkto(heli, "tag_player_attach_left");
player.remotecontrolturret(turret);
}
And this otherwise player is in the way
player.PlayerLinkTo(heli, "tag_player_attach_right", .5f, 10, 170, 30, 150, false);