1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How to rotate the player

Discussion in 'Skript' started by baby raptor, Nov 7, 2021.

Thread Status:
Not open for further replies.
  1. baby raptor

    baby raptor New Member

    Joined:
    Nov 6, 2021
    Messages:
    5
    Likes Received:
    0
    Do I need to change the yaw?
    Right-clicking should rotate it.
    But this did not work.
    Code (Text):
    1. on rightclick holding stick:
    2.     if name of event-item contain "turn":
    3.         set {_yaw} to location of player
    4.         set yaw of {_yaw} to -90
    5.         teleport player to {_yaw}


     
  2. Best Answer:
    Post #5 by baby raptor, Nov 9, 2021
  3. yea rite

    yea rite Active Member

    Joined:
    Jul 11, 2021
    Messages:
    73
    Likes Received:
    5
    This should work

    Code (Text):
    1. on rightclick with stick:
    2.   if name of event-item contains "turn":
    3.     set {_yaw} to yaw of player
    4.     remove 90 from {_yaw}
    5.     set yaw of player to {_yaw}
     
  4. baby raptor

    baby raptor New Member

    Joined:
    Nov 6, 2021
    Messages:
    5
    Likes Received:
    0
    Just changing the yaw did not work.
     
  5. konnte

    konnte Member

    Joined:
    May 7, 2021
    Messages:
    3
    Likes Received:
    0
    teleport player to the same position but with the yaw changed
     
  6. baby raptor

    baby raptor New Member

    Joined:
    Nov 6, 2021
    Messages:
    5
    Likes Received:
    0
    Code (Text):
    1. on rightclick holding stick:
    2.     if name of event-item contain "turn":
    3.         send "teleport"
    4.         set {_loc} to location of player
    5.         set yaw of {_loc} to 90
    6.         teleport player to {_loc}
    I tried this code.
    it's worked.
    It seems that it was not possible due to the addon. thanks.
     
  7. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    143
    Likes Received:
    5
    Setting yaw without teleporting is possible with addons such as skjade or skript-reflect
     
Thread Status:
Not open for further replies.

Share This Page

Loading...