SOLVED!!!
I have the following commands:
1)
/scoreboard players set @e[type=Silverfish,c=1] test 12)
/execute @e[score_test_min=1,score_test=1] ~ ~ ~ testforblock ~ ~ ~ aircomparator between these
/tp @e[type=Silverfish,score_test_min=1,score_test=1] ~ ~-1000 ~/blockdata ~ ~ ~2 {SuccessCount:0}What happened:
As long as the silverfish I summon simultanuously with
/execute @e[type=Pig] ~ ~ ~ summon Silverfish ~ ~3 ~1.2are inside a block (fence) they will not be teleported.
As soon as they move outside, they are.
Sorry guys, my bad, solved!