In one of my games I added a few npcs that will give you an item from talking to them, I made serveral adjustments to the script but nothing seems to make it work I tried searching youtube for better scripts, but they were either too outdated to work or required a money system so im to the forums. I put the the tools in lighting and the dialogue choice names are correct, Does anybody know what's wrong with this script:
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.ChoiceNameHere) then
item = game.Lighting["ItemNameHere"]:clone()
item.Parent = player.Backpack
end
end)
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.ChoiceNameHere) then
item = game.Lighting["ItemNameHere"]:clone()
item.Parent = player.Backpack
end
end)