#tick
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1722605780:t>, feel free to use the Summon Helpers button to ping our helper team.
✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve
can you show the code in tick.json and tick.mcfunction?
In tick.mcfunction, @s doesn't mean anything, since the function is run as the server
You would want to do execute as @a if items entity @s ...
That runs the command as all players, so @s refers to each player individually
so I should change the @s to @a?
No
That would check if any player has the item and give the effect to all players
Do what I said above
but wouldn't it give the effect to only the player who have the item?
What? Changing @s to @a, or my method?
the @s to @a
No
execute if items @a ... checks if any of the players on the server have the item
effect give @a ... gives an effect to all players on the server
so what should I change so that it only gives the effect only to the player who has the trident?
But execute as @a runs a command as each player individually, so you can check item for @s and give effects separately
I told you, here
will it run every tick?
I dont think it works, I dont regain the effect after I hold the item again
Show the command you are using
in?
In tick.mcfunction
Hmm ok
Try adding a /say command in tick.mcfunction to check if it's actually running
it worked but not every tick
Think your folder names are wrong. Are you in 1.21?
yes
Your namespace's function folder is named correctly, but minecraft/tags/functions should be minecraft/tags/function
now it worked, thank you!
If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D