A stick that fires a user from staff position, refuses to work

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

ImAnAgent

Member
Nov 19, 2019
1
0
0
23
I have a short script that is supposed to function when a user is holding a correct stick and hits a player with that stick. Gives out no errors, no debug, but refuses to work. I use PermissionsEx for group management, and the goal is to set the user back to "Default" on hit with stick, and kick user with the other stick. I have skript add-ons Sk-Perm and Ersatz


on damage:
if attacker is holding a stick with lore "&c&lKicks a user":
if victim is a player:
kick victim



on damage:
if attacker is holding a stick with lore "&c&lFires a user":
if victim is a player:
add victim to group "default"
 
have you tried adding debug messages if the group adding syntax triggers? also I recommend to use "on damage of player" then you won't need to check if victim is a player

you could also try to put the code in code tags, maybe tabbing is wrong OR separate code checks like this:
Code:
if type of player's tool is a stick:
  lore of tool of player = "&c&lKicks a user"
  #do something
 
Status
Not open for further replies.