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)
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Where is the script located?
ServerScriptService
Ah, that is your issue. Localscripts cannot run in Serverscriptservice. I'd suggest putting it inside of StarterPlayerScripts, where localscripts can be run.
worked, ty