Switching locations of players

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

PixelCraft_I_D_K

New Member
Jul 18, 2023
7
0
1
16
Hello! I would like to use an egg to switch player's locations when they right click on a player. If they don't right click on a certain player when right clicking, it doesn't remove the egg from the inventory and doesn't execute any commands. Can you help me out here?

My code right now:

on right click with a egg:
name of player's tool is "&6&lSwitch"
{swap.cooldown::%player%} isn't true
set {swap.cooldown::%player%} to true
shoot a egg from player
wait 16 seconds
set {swap.cooldown::%player%} to false
on damage:
projectile exists
projectile is a egg
name of attacker's tool is "&6&lSwitch"
set {_this} to victim's location
set {_that} to attacker's location
teleport victim to {_that}
teleport attacker to {_this}