Solved How to rotate the player

  • 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!

Status
Not open for further replies.

baby raptor

New Member
Nov 6, 2021
5
0
1
20
Do I need to change the yaw?
Right-clicking should rotate it.
But this did not work.
Code:
on rightclick holding stick:
    if name of event-item contain "turn":
        set {_yaw} to location of player
        set yaw of {_yaw} to -90
        teleport player to {_yaw}
 
This should work

Code:
on rightclick with stick:
  if name of event-item contains "turn":
    set {_yaw} to yaw of player
    remove 90 from {_yaw}
    set yaw of player to {_yaw}
 
Code:
on rightclick holding stick:
    if name of event-item contain "turn":
        send "teleport"
        set {_loc} to location of player
        set yaw of {_loc} to 90
        teleport player to {_loc}
I tried this code.
it's worked.
It seems that it was not possible due to the addon. thanks.
 
Code:
on rightclick holding stick:
    if name of event-item contain "turn":
        send "teleport"
        set {_loc} to location of player
        set yaw of {_loc} to 90
        teleport player to {_loc}
I tried this code.
it's worked.
It seems that it was not possible due to the addon. thanks.
Setting yaw without teleporting is possible with addons such as skjade or skript-reflect
 
Status
Not open for further replies.