Basically I used the Official Roblox Dialogue System and Dialogue Editor Beta with this plugin. You may ask why I used this plugin. It’s because the official plugin isn’t maintained anymore. When you go to the NPC it asks if you want a menu to a cafe. If you say “Yes, I want a menu” a Menu GUI will pop up. You see it works on the first time you talk to the NPC but if you talk to the NPC twice after the Menu has already been opened the GUI won’t pop up. Here is the code that makes the menu pop up when the player selects yes.
--execute code when this response is chosen
--player is the player speaking to the dialogue, and dialogueFolder is the object containing the dialogue data
return function(player, dialogueFolder)
print(tostring(player.PlayerGui.PromenadeMenu.Frame.Visible))
player.PlayerGui.PromenadeMenu.Frame.Visible = true
print(tostring(player.PlayerGui.PromenadeMenu.Frame.Visible))
print("Shown")
end
On the first attempt the output shows:
false
true
Shown
But then when I go back to the NPC again and do the same actions the output shows:
true
true
Shown
Also, I don’t think this is related but in the menu GUI if the player wants to exit the GUI they press the “X” button which just makes the GUI Visible set to false.
When the player clicks X
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)
My theory is that the NPC sets the menu GUI visible on the server-side and the player makes the Menu Invisible on the client-side meaning that the server still thinks that its set to true even though the player set it false on the client-side. I don’t know if this true or not but if anyone has any solutions regarding this it would be appreciated!