I dont think this is right. You have if isLocalPlayer under a check for isLocalPlayer.