This fixes the plater error when friendly nameplates are enabled with the "Cast Target on Spell Name" mod.
Just delete the previous mod and import this one.
Original Mod here: https://wago.io/pj8kSlqkK
I just incorporated the fix in the comments for people who are uncomfortable editing scripts.
Credit to the original mod author https://wago.io/p/Tercioo and the person who suggested the fix https://wago.io/p/crusty