Skript - Armorstand head rotation with loops

  • 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.
Mar 12, 2019
1
0
0
Brazil
Hello guys, I'm having a problem with my script of granade csgo, and I'm creating a way for grenades to spin like they were thrown, and I used the technique of an invisible armorstand with a head item, and tried to make armorstand head to move in each loop, but it's not working.

Can anyone help me?
Code:
on right click with potato:
    set {loc} to player's location
    spawn an armor stand at {loc}
    set {_entity} to last spawned armor stand
    {_entity}.setCollidable(false)
    add "{NoGravity:1}" to nbt of {_entity}
    add "{Invisible:1}" to nbt of {_entity}
  
    push {_entity} upwards at speed 1
    push {_entity} in direction of player at speed 5
    wait 1 tick
    remove 1 potato from player
    play raw sound "mob.villager.idle1" at player with pitch 1 volume 1.0
    set helmet item of {_entity} to potato
    add "{NoGravity:0}" to nbt of {_entity}
  
    set {_angle} to {_entity}.getHeadPose()
  
    loop 60 times:
        wait 5 tick
        {_angle}.add(10, 10, 0)
      
        {_entity}.setHeadPose({_angle})
 
Status
Not open for further replies.