Teleport Sword
I'm trying to make a sword where when you right click it you teleport forward 8 blocks in the direction you're looking, but I have 2 problems, the first of which is I can't figure out how to prevent players from teleporting through walls, or going inside of blocks, and the second of which is how I would go about adding a cooldown to teleporting for 4 seconds.
Continue to help post