You have two mistakes in your command.
First of all, your target selector is wrong. Target selector arguments use a <argument>=<value>
syntax, meaning it should be score_kills_min=1
. A colon as separator is only used for data tags (which you aren't using in this command).
Secondly, the syntax for execute
requires 4 arguments before the other command:
execute <entity> <x> <y> <z> <command …>
Minecraft commands are dumb, they can not divine which arguments are not given when some are missing. In your case, the game sees the following arguments:
<entity> = @p[score_kills_min=1]
<x> = setblock
<y> = 195
<z> = 56
<command …> = -1199 minecraft:redstone_block
This is obviously rubbish and the command would fail. If you don't require <command …>
to be run from a specific location (if you do, you know), just use ~ ~ ~
for the coordinates.
In summary, your command should be:
execute @p[score_kills_min=1] ~ ~ ~ setblock 195 56 -1199 minecraft:redstone_block
The execute command should do the trick. Here is an example that spawns the mob you were trying to spawn at the location of every player.
/execute @a ~ ~ ~ summon spider ~ ~1 ~ {Passengers:[{id:skeleton,HandItems:[{Count:1,id:bow},{Count:1,id:shield}],ArmorItems:[{Count:1,id:diamond_boots},{Count:1,id:diamond_leggings},{Count:1,id:diamond_chestplate},{Count:1,id:diamond_helmet}],CustomName:Killer,Visible:1,HandDropChances:[1.0f,1.0f],ArmorDropChances:[1.0f,1.0f,1.0f,1.0f],ActiveEffects:[{Id:1,Amplifier:1,Duration:999999},{Id:5,Amplifier:1,Duration:999999},{Id:8,Amplifier:1,Duration:999999},{Id:12,Amplifier:0,Duration:999999}]}]}
Of course this can be changed to spawn any mob like this:
execute @a ~ ~ ~ summon <your mob> [x] [y] [z] [dataTag]
Also, if you wanted to summon it at the location of the nearest player you simply change the @a to @p
Or to do a specific player enter @a[name=<player name>]
Best Answer
To do this, you will need 10 command blocks in series, connected to this daylight sensor setup:
Attach the daylight sensor output to A- a not gate, and B- a 14-block long line of redstone dust. The outputs of both of these should activate the 10 command blocks all containing:
execute @a ~ ~ ~ summon Zombie
P.S. the execute command CAN be used in command blocks.