--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")' "