Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a part that when a player clicks on it, it gives them a tool? [closed]

Asked by 5 years ago

Hi guys! I need some help here. Is there any way I can make a part that when a player clicks on it, it will give them a tool.

(BTW, the tool's name is "Cup")

I hope that some of you will help me with this. Thanks if you do! :D

Closed as Not Constructive by awfulszn and hiimgoodpack

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
-1
Answered by
p0vd 207 Moderation Voter
5 years ago
Edited 5 years ago

Make sure to put the tool, "Cup" under ReplicatedStorage. Paste the code down below into a script thats under the part:

local cd = Instance.new("ClickDetector")
cd.Parent = script.Parent

cd.MouseClick:Connect(function(Plr)
    local cup = game.ReplicatedStorage.Cup:Clone()
    cup.Parent = Plr.Backpack
end)

0
Please accept if this helped! p0vd 207 — 5y
0
If you only want the player to be able to click it onces, add 'Script:Destroy" after line 6 ChefDevRBLX 90 — 5y
0
Downvoted because this supports requests hiimgoodpack 2009 — 5y
Ad