Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local openNameInput = ReplicatedStorage:WaitForChild("OpenNameInput")
- local gui = script.Parent
- local frame = gui:WaitForChild("Frame")
- local dialogueText = frame:WaitForChild("DialogueText")
- gui.Enabled = false
- local messageId = 0
- openNameInput.OnClientEvent:Connect(function(responseText)
- if typeof(responseText) ~= "string" then
- return
- end
- messageId += 1
- local thisMessageId = messageId
- dialogueText.Text = responseText
- gui.Enabled = true
- task.delay(3, function()
- if thisMessageId == messageId then
- gui.Enabled = false
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment