#HOW DO I MAKE IT SO A TOOL IS GIVEN TO ALL PLAYERS IN THE GAME THEN REMOVED AFTERWARDS?

1 messages · Page 1 of 1 (latest)

rare hatch
#

I want to do this through a screengui button for only myself, when I click the button once, every player in the server receives for example a push or punch tool from ReplicatedStorage. When I press it again, every player who had that punch or push tool will have it removed from their inventory. I also want to make sure that if a player resets or leaves the game whilst the tools in their inventory, it won’t break the game.

Thank you.

rare hatch
mint raptor
rare hatch
rare hatch
# mint raptor You want tool to be saved when player dies?

No basically, when I press my screen gui button for an owner only menu, it will give all players currently in the server a push tool. Afterwards, some players will die in the game I’ve got and some may leave too, meaning the tool clone is automatically deleted from their inventory. After they’ve died, I want to make sure that when I click the button again, all the push tools still left in the other player’s inventories are removed

mint raptor
rare hatch
rare hatch
# mint raptor Loop through everything inside a table

So I add all current players to a table, loop through it until a certain condition is met and remove the tools from the player lists’ inventories. Would players be removed from this list if they die/leave? how would I do this?