Here is my script:
command /disenchant:
permission: command.disenchant
trigger:
if player's held item is enchanted:
set {_tool} to player's held item
set {_enchants::*} to enchantments of {_tool}
send "&aSucessfully removed %{_enchants::*}% from tool!" to player
disenchant player's held item
give player enchanted book with custom nbt "{StoredEnchantments:%{_enchants::*}%}"
else:
send "&cYour item is not enchanted."
Whenever I reload the script everything works but the give effect statement.
I've tried looking it up but couldn't find anything.
My server is on 1.16.5 and I have SkRayFall, SkStuff, TuSKe, and SkQuery.