I want to make an NPC dialogue that gives you a tool when you interact with a dialogchoice. For me it seemed like a simple localscript, but it just doesn’t work. I’ve tried adding a print(player.Name) to debug it but it doesnt print meaning it doesnt fire the function at all. What am I doing wrong?
Localscript:
local tool = game:GetService("ReplicatedStorage"):WaitForChild("Bloxy Cola")
script.Parent.DialogChoiceSelected:Connect(function(player, choice)
if choice.Name == "Bloxy Cola" then
tool:Clone().Parent = player.Backpack
end
end)