Why is Dialog.DialogChoiceSelected event not firing?

I am trying to make a shop, you talk to a blacksmith to access the shop
when i ask for a weapon via the dialog i put in the blacksmith, the DialogChoiceSelected event seemingly didn’t fire. I came to this conclusion after seeing that nothing printed in my code.
I have looked at the developer hub just to reconfirm nothing was wrong, i checked where i placed the script, during play test, and also when scripting, to make sure nothing was wrong.

dialog script:

local Smith = script.Parent
local Dialog = Smith:WaitForChild("Head"):WaitForChild("Dialog")
local RpS = game:GetService("ReplicatedStorage")
local ClientEvents = RpS:WaitForChild("GameRemotes"):WaitForChild("Client")

Dialog.DialogChoiceSelected:Connect(function(plr, choice)
    -- code in comments mean that they were there, but deleted
	if not ClientEvents:FindFirstChild("Buy") then print("bruh") return end -- did not print
    -- print(plr.Name.."'s choice was: "..choice.Name) -- did not print either
	if choice.Name == "weapon" then
		wait(2)
		ClientEvents.Buy:FireClient(plr)
		print("Test") -- also did not print
	end
end)

images of explorer:
Explorer (1)
Explorer (2)

also, i got no errors. i wouldn’t be asking if there were errors, because i usually know what the errors mean. if i don’t know what an error meant, i would just ask for details about an error instead of a question like this

1 Like

if I’m remembering correctly, you can only use this on the client-side. maybe move it to a LocalScript and use CollectionService to retrieve the shop dialogs.

4 Likes

hold up but then what’s the purpose of the player parameter? seems to be the sollution though, so thanks anyway

I’m assuming Roblox just never updated it to work with FilteringEnabled, otherwise it would work. I’d recommend using a custom dialog system anyway, allows for more customization and the default one feels outdated anyway, at least to me.

1 Like

They should, otherwise shop games like this are not going to work with the Dialog. But maybe its a old feature so I doubt that Roblox is going to fix this issue.

This sucks cause I have a condition that once met does something to the server but needs the server to check the condition so I have to make a script to talk to local and back to server again Roblox should make it possible to play this function on a server script for convenience. Honestly I would have never known about this with out your comments so thank you for that.

the other way is to just make a custom dialog system
but that’s a massive pain

1 Like