
Weekly Command Block Creations #3 - Disabling Movement
This command works for both Java and Bedrock Edition and this makes people unable to move.
Java Edition - execute @a[name=some_poor_fool] run teleport @a[name=some_poor_fool] ~0 ~0 ~0
(Make sure command block is on repeat)
Bedrock Edition - execute @a[name=some_poor_fool] teleport @a[name=some_poor_fool] ~0 ~0 ~0
(Make sure command block is on repeat)
Replace 'some_poor_fool' with a person's name to disable movement for them or delete '[name=some_poor_fool]' to disable movement for everyone.
WARNING: Don't turn it on for everyone if there's no one that's close enough to the command block to turn it off or break, because then it'll be on forever.