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)
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
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.
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.
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.