Help please.
local player = game.Players.LocalPlayer
local character = game.Players.LocalPlayer.Character
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
-- Find NPC
local NPC = game.Workspace.NPC
-- Main Variables
local UIS = game:GetService("UserInputService")
local distance = 15
-- Gui
local GUI = game.StarterGui.NPC_Chat_System
local guiFrame = GUI.NPC_Chat_Frame
-- Main Code
if (humanoidRootPart.Position - NPC.HumanoidRootPart.Position).magnitude < distance then
guiFrame.Visible = true
end

2 comments
Can you please elaborate? What are you trying to achieve exactly?
I was testing a bit