Can't change pitch of entity

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

Mapzman

Member
Mar 26, 2017
11
0
1
The 4th line won't change the entity's pitch, but the 3rd line changes the entity's yaw perfectly.
I wanted to know if there was any reason for why the pitch can't be changed or if I made a mistake.
Thank you!

code_language.skript:
set {_variable} to location of player
loop 40 times:  
        set yaw of {_variable} to 90
        set pitch of {_variable} to 90
        teleport {entity.%player%} to {_variable}
 
You could just use the location function:
code_language.skript:
set {_variable} to location(x-pos of player, y-pos of player, z-pos of player, event-world, 90, 90)
Also, you should use list variables (the ones separated by two colons and not a dot) instead of single ones, they're better in many ways.
 
You could just use the location function:
code_language.skript:
set {_variable} to location(x-pos of player, y-pos of player, z-pos of player, event-world, 90, 90)
Also, you should use list variables (the ones separated by two colons and not a dot) instead of single ones, they're better in many ways.

I tried using the location function, but it caused my server to crash. I'm using skript version 2.2-dev29
 
My server stopped crashing after I tried reloading a second time

The error: "Functions cannot be used here. (test.sk, line 52: set {_variable} to location(x-pos of player, y-pos of player, z-pos of player, event-world, 90, 90)"
 
Status
Not open for further replies.