How do i fix this?

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

ponduck

New Member
May 29, 2024
5
0
1
24
I'm new to skript and i want to make a freeze skript, this is what ive come up with:


SCSS:
command /freeze <player>:
    permission: op
    permission message: You &4&ldon't &rhave the permissions to use this!
    trigger:
        if arg-1 is not set:
            set player's walk speed to 0
            set player's fly speed to 0
            play sound "block.note_block.pling" at volume 1 at pitch 2 to player
            message "&3&lYou have been &f&lfrozen!"
        else:  
            set arg-1's walk speed to 0
            set arg-1's fly speed to 0
            message "&3&l%arg-1% has been &f&lfrozen!"
            play sound "block.note_block.pling" at volume 1 at pitch 2 to arg-1
            send title "&3&lYou have been &c&lfrozen!" to arg-1 for 3 seconds

command /unfreeze <player>:
    permission: op
    permission message: You &4&ldon't &rhave the permissions to use this!
    trigger:
        if arg-1 is not set:
            set player's walk speed to 1 *0.2
            set player's fly speed to 1 * 0.1
            play sound "block.note_block.pling" at volume 1 at pitch 2 to player
            send title "&3&lYou have been &c&lunfrozen!" to arg-1 for 3 seconds
        else:  
            set arg-1's walk speed to 1 * 0.2
            set arg-1's fly speed to 1 * 0.1
            message "&3&l%arg-1% has been &c&lunfrozen!"
            play sound "block.note_block.pling" at volume 1 at pitch 2 to player
            send title "&3&lYou have been &c&lunfrozen!" to arg-1 for 3 seconds

Freezing other players work but not myself, i want to make it that if argument 1 (player) is not set it will freeze the person running the command, how?
 

Attachments

  • afbeelding_2024-05-29_113510575.png
    afbeelding_2024-05-29_113510575.png
    2.5 MB · Views: 22