1. I made a code that check if my target is friendly or not to display a certain texture on my wow. The code works fine but if I target someone that is not visible to me (needing summons or outside of a raid) it gives me tons of Lua Erors. Here is the code I have `function ()

    if UnitExists("target") and UnitReaction("player", "target") > 4 
        return true
    return false


    I'm not sure if this will help, but I think UnitIsEnemy is more suited to determining whether a targeted unit is hostile or not.

    Also, what errors are you getting specifically?