I can't figure out why the code isn't running, it is inside a local script.
local dialog = workspace["Test SellNPC"].Head.Dialog
local function sellgold(player, choice)
print("gold sold")
end
dialog.DialogChoiceSelected:Connect(sellgold)
Ah, that is your issue. Localscripts cannot run in Serverscriptservice. I'd suggest putting it inside of StarterPlayerScripts, where localscripts can be run.Jac_00b157— 1y