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
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
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Please accept if this helped!
If you only want the player to be able to click it onces, add 'Script:Destroy" after line 6
Downvoted because this supports requests