Object "X-Ray/Highlighting" System

What if you only want a team to be able to see the outline? Would you just have to do that in a local script, If so that would be dangerous how seeing hackers could use that to see the other teams locations

how do I use this? I am so confused.