Advertisement
XxxLloyd061302xxX

RemoteEvent Script [Must be in the NPC, Regular Script]

Jul 18th, 2018
3,909
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. script.Parent.NPCTalk.OnServerEvent:connect(function(player)
  2.     if not player.PlayerGui:FindFirstChild("") 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(""):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