I want to make my shop GUI visible when the player asks my NPC to view the items on sale. I have no idea how to do this, as DialogChoiceSelected does not work with FE, and my game needs to be FE compatible. How will I achieve this?
Try making a Dialog inside an NPC's Head. There Should be "Choice1" and "Choice2" inside, otherwise you can just make more dialog replies.
Try putting this script inside the Dialog:
--MAKE SURE YOU DON'T COPY THE COMMENTS local Dialog = script.Parent Dialog.DialogChoiceSelected:connect(function(Player, Choice) if not Player then return end -- Choice1 is the name of the reply dialog in which the player will choose inorder to activate the gui, if Choice.Name == "Choice1" and Player.PlayerGui:findFirstChild("NAMEOFYORUGUI")--[[this makes sure that the player doesn't receive the same gui twice.]] == nil then local Gui = script.NAMEOFYOURGUI:clone() -- change NAMEOFYOURGUI to the name of your gui and make sure to put it under the script. Gui.Parent = Player.PlayerGui end end)
Since DialogChoiceSelected does not work with FE, I used a ClickDetector instead. It worked.
Closed as Not Constructive by User#19524 and User#20388
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?