Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

anyone know how to give a player a tool after choosing a dialogue choice from an NPC?

I want the player to receive a tool after selecting a dialogue choice from an NPC.

2 comments

0

This is not a script request site. Try it firstly by yourself.

0

i did. I am a builder so i am pretty bad

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.