How to work module script?

Hello! I am having problem of the gui not showing up, is it because of it’s a module script?

Here is the module in replicated storage:

local PopUpDialogManager = {}

local Objective = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Objectives"):WaitForChild("ObjectiveLabel2")

function PopUpDialogManager.CoreGUIEnabled(BooleanVal)
	game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, BooleanVal)
end

function PopUpDialogManager.typeText(msg, typeTime)
	for i=1, #msg do
		Objective.Text = string.sub(msg, 1, i)
		wait(typeTime / #msg)
	end
end


return PopUpDialogManager

Here is the script in the Starter Gui:

local Dialog = require(RS:WaitForChild("PopUpDialogManager"))

local Trigger = workspace:WaitForChild("Dialogue"):WaitForChild("D1")

Sequence_1 = Trigger.Touched

Trigger.Touched:Connect(function(player)
	
	Dialog.CoreGUIEnabled(false)
	
	Dialog.typeText( "Huh, why am I here..?", 2)
	
	wait(6)
	
	Dialog.CoreGUIEnabled(true)
	
end)

make sure the script inside Starter Gui is a localscript

It’s a local script, I have no idea why it’s not working