I'm not sure you even have the client objects you want to use jointeam and ifplayername on
I'm guessing it will only work on the owner of the bricks, from what you have
you might need to event the spawns or some other input method, like a constant loop