So I have a dialog choice where when you click choice you get a GUI that opens after the NPC's response, but it won't work at all, and the script is in a local script.
---Script---
--- Script type is a local script script.Parent.DialogChoiceSelected.Response:Connect(function(player, choice) game.player.PlayerGui.ShopGui.Frame.Visible = true end)
Looks like there's a couple of issues, with the first thing being the way you're referencing player.
"game.player" is essentially the same thing as game.Workspace. or game.StarterGui and since "game.player" doesn't exist, your script will throw an error.
Assuming this local script is inside of the PlayersGui it should be rewritten with:
game.Players.LocalPlayer --This is how you reference your player.
Now another issue is the fact you're using a LocalScript for an Instance that can't use LocalScripts. An easy fix to this is to put a regular Script inside of your Dialog Box, and add the following code:
script.Parent.DialogChoiceSelected.Response:connect(function(plr, choice) plr.PlayerGui.ShopGui.Frame.Visible = true --Plr was referenced above so no need for the 'game.' end)
Assuming you don't have FE (Filtering Enabled) on, the script should work.