Advertisement
Guest User

The Script inside of the NPC

a guest
Apr 21st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. script.Parent.NPCTalk.OnServerEvent:connect(function(player)
  2. if not player.PlayerGui:FindFirstChild("NPCChat") then -- Checks if the player already has the gui. Put your gui name between the quotation marks to the name of your GUI
  3. local gui = script.Parent:FindFirstChild("NPCChat"):Clone() -- Change here too. Clones the gui
  4. gui.Parent = player.PlayerGui -- Clone the gui and put its parent to the player gui.
  5. end
  6. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement