I am trying to make a quest system, but first I got help at hidden developers their answer wasn’t very correct, but they got me somewhere in the middle. The script is located in an NPCs head within a dialog.
The script does not print the choice name, it only does one line (line 1)
I have tried other solutions such as scripting helpers and youtube, but got no good results that worked.
local dialog = script.Parent
dialog.DialogChoiceSelected:Connect(function(p, choice)
print(choice.Name)
if choice == dialog.acc then
p.Stats.questA_active = true
end
if choice == dialog.cancel then
p.Stats.questA_active = false
end
end)
Didn’t work, doesn’t even print anything.
I can’t tell what’s going on anymore.
local dia = script.Parent
local evn = game.ReplicatedStorage.SendQuest
print("test")
dia.DialogChoiceSelected:Connect(function(p,choice)
print("second test")
print(choice.Name)
if choice == dia.acc then
evn:FireServer("coco","accept")
end
if choice == dia.cancel then
evn:FireServer("coco","cancel")
end
end)
Sorry about the EXTREME delay my computer crashed and when I got it working I had forgotten about your issue. So “test” nor "second test’ is printing? Check Output for errors.
We’re going to need the above of the script. It could indicate why “test” hasn’t printed. It could be because a loop hasn’t broken etc. Or as @Syclya mentioned, it could be because the script might not be in the right place.