How to teleport a player only to a specific y

Started by Stoutscientist on Mon, 07/12/2021 - 15:55

Topic category: Help with modding (Java Edition)

Last seen on 16:02, 18. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to teleport a player only to a specific y
Mon, 07/12/2021 - 15:55

Hello! I'm making something and I need it to teleport a player to lets say y=93 but I can't leave the x and z blank. If I just leave it as x and z then the player gets all glitchy... 

Last seen on 17:56, 17. Sep 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
so if you just add the "move…
Mon, 07/12/2021 - 22:50

so if you just add the "move player to Z Y X" it should work if you do "X 93 Z", I don't know what you mean by glitchy, since I tried this by right clicking with an item in my hand and it works ok

Last seen on 16:02, 18. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I have it under tick so it…
Tue, 07/13/2021 - 01:00

I have it under tick so it runs a bunch causing me not to be able to move

Last seen on 16:02, 18. Sep 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I can attach a video if you…
Tue, 07/13/2021 - 01:00

I can attach a video if you would like

Last seen on 00:00, 30. Aug 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You might be able to fix it…
Tue, 07/13/2021 - 20:42

You might be able to fix it by storing the player's X and Z, and checking if the previous X and Z do not match before teleporting them.