I want the player to receive a tool after selecting a dialogue choice from an NPC.
✓ ANSWER ACCEPTED
anyone know how to give a player a tool after choosing a dialogue choice from an NPC?
1 answer
✓ Accepted answer
You could use DialogChoiceSelected, just make a script in the Dialog and add the following.
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then -- Change the Choice1 to whatever your choice's name is.
local item = game.ServerStorage:FindFirstChild("itemname"):clone() -- Change itemname to the name of the item.
item.Parent = player.Backpack
end
end)
Do note that I made that the item must be in the ServerStorage in order to get found. You can change the item's location but i suggest you leave it at the ServerStorage.
1 comment
0
tysm
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
This is not a script request site. Try it firstly by yourself.
i did. I am a builder so i am pretty bad