Alternatives to scoreboards?
Hello fellow datapackers, I was wondering if there are any alternatives to selecting a specific player to run a function on and the only way I know right now is scoreboards. I have realised many issues because i want to select the player that pressed a button to activate the command block that activates the function but when i add the score to the player who presses the button i use @p but if there is someone closer to the command block it will select them and i do not want that. Another problem I have is writing execute as @a if score… because my entire function just wants to run on that player once and only that player who has the score but i find it very annoying to having to paste in the first half of the command every time i want to run a command on that player. I am looking for a potentially better/less laggy solution to this and I was wondering if i could use predicates or execute store but i have absolutely no experience in these 2 things and i need help please.
I apologise if my post is hard to read because i am not great at english and i am sleepy right now.
Continue to help post