Executing Command as another player still using self as "player" variable

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

    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!

Michael2309

Member
Mar 28, 2025
1
0
1
I have a simple execute command:

/execute as player2 at @s run skript:examplecommandname

And what I want is that it kind of works like a sudo command. I want it to give the playername to the command in the skript so that I can access it using player. However if player1 runs the given command on player2 it will still pass player1 to the skript file. Is there a way to resolve this? perhaps passing in a selector like @p and processing it in the skript
 
bruh just use this

command /sudo <player> <text>:
permission: op
trigger:
make arg-1 execute command arg-1