NPC dialogue store

Hi. So, I tried to script a dialogue store (like player choose a dialogues response and get the item.) Can someone help me?

script.Parent.DialogChoiceSelected:Connect(function(player, choice)
    if(choice == script.Parent.Choice1) then 
        local item = game.ServerStorage:FindFirstChild("Water"):Clone();
        item.Parent = player.Backpack;
    end;
end);

Thank you.

1 Like

Pretty sure there are many free model dialogue shops that you can take a look through, assuming they work, to try and understand how one is created. That being said, sure you can get some help - could you start by outlining the issue you’re having? Please also provide more details such as the hierarchy of your dialogue, any error messages you might be receiving, debug attempts you’ve done and so on.

1 Like