Hasli4

Untitled

Aug 30th, 2026
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2.  
  3. local openNameInput = ReplicatedStorage:WaitForChild("OpenNameInput")
  4.  
  5. local gui = script.Parent
  6. local frame = gui:WaitForChild("Frame")
  7. local dialogueText = frame:WaitForChild("DialogueText")
  8.  
  9. gui.Enabled = false
  10.  
  11. local messageId = 0
  12.  
  13. openNameInput.OnClientEvent:Connect(function(responseText)
  14.  
  15. if typeof(responseText) ~= "string" then
  16. return
  17. end
  18.  
  19. messageId += 1
  20. local thisMessageId = messageId
  21.  
  22. dialogueText.Text = responseText
  23. gui.Enabled = true
  24.  
  25. task.delay(3, function()
  26. if thisMessageId == messageId then
  27. gui.Enabled = false
  28. end
  29. end)
  30. end)
Advertisement
Add Comment
Please, Sign In to add comment