I wanted to make a gui where people can add dialogs to their own characters however it never shows up :( here is my code:
local ply = game.Players.LocalPlayer.Humanoid.Head local txt = script.Parent.Parent.TextBox.Text function onClick() local dia = Instance.new("Dialog") dia.Parent = ply dia.InitialPrompt = txt end
Head
is not inside of the Humanoid
, but inside of the Character
.local ply = game.Players.LocalPlayer local button -- location of button here local txt = script.Parent.Parent.TextBox local function onClick() -- use more local variables unless you need it global local dia = Instance.new("Dialog") dia.InitialPrompt = txt.Text dia.Parent = ply.Character.Head -- it's in character not humanoid end button.Activated:Connect(onClick)