I'm making an NPC but It does not show on client

I have this server script in a proximity prompt in my npc’s torso.

local ProxPrompt = script.Parent
local Gui = script.Parent.Parent.Parent.Dialogue
local NpcPicture = Gui.MainFrame.DialogueFrame.NpcPicture
local NpcTitle = Gui.MainFrame.DialogueFrame.NpcTitle
local DialogueText = Gui.MainFrame.DialogueFrame.Dialogue
ProxPrompt.Enabled = true
ProxPrompt.Triggered:Connect(function()
	local GuiClone = Gui:Clone()
	GuiClone.Enabled = true
	GuiClone.Parent = game.StarterGui
	GuiClone.MainFrame.DialogueFrame.NpcPicture.Image = "rbxassetid://9011713759"
	GuiClone.MainFrame.DialogueFrame.NpcTitle.Text = "Noob"
	GuiClone.MainFrame.DialogueFrame.Dialogue.Text = "I'm just a noob."
	if GuiClone then
		ProxPrompt.Enabled = false
	end
end)

Screenshot 2025-02-13 124307
this is the gui for better understanding, it’s inside of the npc.

My issue is that I cannot see the dialogue gui inside of the game but when I switch to server then I see it.


This is the client after I talked to the npc

this is the server after I talked to the npc.
For some reason the gui is not visible for client.

You clone the GUI in the StarterGui. You need to clone it in the PLayerGui.

local ProxPrompt = script.Parent
local Gui = script.Parent.Parent.Parent.Dialogue
local NpcPicture = Gui.MainFrame.DialogueFrame.NpcPicture
local NpcTitle = Gui.MainFrame.DialogueFrame.NpcTitle
local DialogueText = Gui.MainFrame.DialogueFrame.Dialogue
ProxPrompt.Enabled = true
ProxPrompt.Triggered:Connect(function(Player)
	local GuiClone = Gui:Clone()
	GuiClone.Enabled = true
Player = game.Players:FindFirstChild(Player.Name)
	GuiClone.Parent = Player.PlayerGui
	GuiClone.MainFrame.DialogueFrame.NpcPicture.Image = "rbxassetid://9011713759"
	GuiClone.MainFrame.DialogueFrame.NpcTitle.Text = "Noob"
	GuiClone.MainFrame.DialogueFrame.Dialogue.Text = "I'm just a noob."
	if GuiClone then
		ProxPrompt.Enabled = false
	end
end)

ok it works now I’ll use that in the future thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.