Minecraft – How to get the Kill command on a command block to work

minecraft-commandsminecraft-education-edition

I know this question has been asked a lot, but none of the answers fixed my problem. I am using education edition, by the way, so maybe that is why. Anyway, I plug in the /kill @p command to my command block. Now, I want to make it so that if somebody pushed a button it would kill them but I'm not sure how to do that. If anybody could help that would be much appreciated as I am new to the use of Command Blocks. Am I doing it wrong?

Best Answer

If you are playing education edition from Bedrock edition, then you'll need to set the player's gamemode to survival (or adventure), then kill them:

/gamemode s @p
/kill @p