Help on "press enter to continue dialog" and Gui not showing up

hello, im currently making a script that activates when a player click on a proximity prompt.
but the script doesn’t work as i intended

so how the script works is when a player presses “E” on their keyboard a GUI will show up and texts will show up like a typewriter and player will have to press “Enter” to continue the dialog and move to the next one.

heres what i did to the scripts :

a local script i put inside the screen gui

local input = game:GetService(“UserInputService”)
local enter = script.Parent
local module = require(game.ReplicatedFirst.Convo_Random)
local conversation = game.Workspace.lol.Sign.Interact.ProximityPrompt.RandomConversation

local function Text()
module:Textmessage()
end

if wait(conversation)then
input.InputBegan:Connect(function(input,hi)
if hi then
return
end
if input.KeyCode == Enum.KeyCode.Return then
Text()
end
end)
end

a module script i put inside a Replicated First

local module = {}

local Dialog_Text = game.StarterGui.Dialog.DialogFrame.Text

local function Textmessage()

Dialog_Text.Text = “Test 1 2 3”

end
return module

another local script i put inside a proximity point (game.workspace.lol.Sign.Interact.ProximityPrompt.RandomConversation)

local gui = game.StarterGui.Dialog

gui.Enabled = false

script.Parent.Triggered:Connect(function()

gui.Enabled = true
end)

Any help would be appreciated! :smiley:

Do you think you could properly format the code and also send a screenshot of the hierarchy for developers to better understand your issue?

but i do (kinda) put the hierarchy here?

also, i believe the issue may be in the script in the Proximity Prompt. You’re changing the visibility of the GUI in startergui rather than playergui. try this:

--Define basic variables
local player = game:GetService("Players").LocalPlayer
local gui = player.PlayerGui
--Set gui to not enabled
gui.Enabled = false
--triggers function to enable GUI
script.Parent.Triggered:Connect(function()
    gui.Enabled = true
end)

nope, i already tried it. theres nothing coming out of the output so far, not even an error :frowning:

Ahh, I see why, because it’s in a local script. You’ll need to find a way to convert it to a regular script. I’ll do that for you.

--Start function
script.Parent.Triggered:Connect(function(player) --ties argument with the player
    --Define Basic Variable(s)
    local gui = player.PlayerGui.Dialog

    --Starts actual function part
    gui.Enabled = true
end)

it also didn’t worked. im getting this error message on the output

“Workspace.lol.Sign.Interact.ProximityPrompt.RandomConversation:2: attempt to index nil with ‘PlayerGui’”

Can you send me a screenshot of startergui?

--Start function
script.Parent.Triggered:Connect(function(player) --ties argument with the player
    player.PlayerGui.Dialog.Enabled = true
end)