I am currently trying to create a cafe for a group owned by a friend of mine and was having trouble figuring out how to make a giver that would dispense a specific tool on touch. Basically like the coffee machines, etc. you would see behind the counter of any ROBLOX personal server cafe. I've never done anything like this before, so please help me! Thanks.
First you would need a script inside of the "giver" or the block that gives the tool. Next, you would basically just need to do is something like this inside the script:
Tool=game.Lighting.Tool --Find the tool here script.Parent.Touched:connect(function(Part) --Fires when brick is touched if Part.Parent:FindFirstChild("Humanoid") then --Checks if a character touched local Player=GetPlayerFromCharacter(Part.Parent) Tool:clone().Parent=Player.Backpack --Clones tool and gives to player end end)
Anyways, if you edit it correctly to find the tool, everything should work perfectly fine. If you have any further questions please leave a comment below. Hope I helped :P