Placing a tool down on a counter/table for someone else to pick up

My goal is to be able to set a tool down on a table/counter area as a normal model, that could then be clicked on and picked up by someone else. Kinda like a restaurant system.

Not sure how I would go about starting this?

First I would check if the tools parent is someone’s character or their backpack.

I did this for my lantern tool in my game. I actually made a transparent part (ClickerPart) that was larger than the lantern model. Inside this part, I inserted a ClickDetector and a Script. Here is the script:

 local tool = game.ServerStorage["Lantern"]
 local giver = script.Parent
 local canGive = false
 
 local function GiveTool(player)
 	if canGive == false then
		canGive = true
		local clone = tool:Clone()
 		clone.Parent = player.Backpack
		wait(1)
 		canGive = false
	end
 end
 
 giver.ClickDetector.mouseClick:Connect(function(player)
 	GiveTool(player)
 end)

This works because I also have the lantern tool in my ServerStorage. So, the script functions as following:

  1. Player clicks the invisible block that’s larger than the actual lantern model.
  2. Script goes to my ServerStorage, finds the tool named “Lantern”, clones the Lantern tool in the ServerStorage, and places it in the player’s backpack.

image
image

Make sure to replace “Lantern” with whatever the tool name is in your ServerStorage.

1 Like