--I tried making a script where the gui appears when you click the npc, here is the script. --script location: local script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local NPCs = workspace.NPCs
local HumanoidRootPart = NPCs:WaitForChild('HumanoidRootPart')
local AnimateUI = require(ReplicatedStorage:WaitForChild("AnimateUI"))
local ClickDetector = workspace.hum.ClickDetector
local label = script.Parent
local ScreenGui = game.StarterGui:WaitForChild("ScreenGui", 0)
ScreenGui.Enabled = false
function onMouseClick()
ScreenGui.Enabled = true
local message1 = [[Hi welcome to my pogr gam]]
AnimateUI.typeWrite(label, message1, 0.05)
wait(1)
local message2 = [[thiz iz a test]]
AnimateUI.typeWrite(label, message2, 0.05)
end
ClickDetector.MouseClick:Connect(onMouseClick)
I keep getting, "Infinite yield possible on 'Workspace.NPCs:WaitForChild("HumanoidRootPart")' "

3 comments
does the npc have a humanoidrp?
"Infinite Yield Possible" means that when you used ':WaitForChild("HumanoidRootPart")', it couldn't find the part. May I ask, is "NPCs" a folder/model and what are the children?
NPCs is a folder yes, and the child is just the Dummy.