Yes, this looks like it's your problem. Plus, the script is attached to a create-on-demand frame, so I think (can't remember, too tired to check) that the script isn't ever being called either. You could easily test that by putting "eePanels2:print("script called") at the very top of the script, but it won't help you too much.
thanks alot :)
I reattached the panels to UIParent and moved them from there to where they should be, now the script works perfect :)
On a second note, what is the if-sentence called if i want to check if partymember1 (and 2 etc.) has a target?