How do I make an incrementing variable?
I am wanting to create a variable that can go up, and I am wanting to use it in a command. Just for an example for me to understand it, how do I make it so whenever I run the function "Increment", it will increment the variable by one every time, then teleport me to that Y value using /tp @a ~ variable ~. I believe this may use scoreboards, but I don't know how to put that into an actual command.
version 1.21.4 (current)
Also, which pack format should I use in pack.mcmeta to achieve this? Thank you!
Continue to help post