Here's the dialogue module btw, just couldn't fit it all into one initial message ToT
local dialogueGui = game:WaitForChild("DialogueScreen")
local dialogueBox = dialogueGui:WaitForChild("DialogueBox")
local nametag = dialogueGui:WaitForChild("Nametag")
local dialogue = game:WaitForChild("DialogueText")
local name = game:WaitForChild("NameText")
local active = false
local player = game.Players.LocalPlayer
local dialogueSequence = script:WaitForChild("DialogueSequence")
local targetDialogue = dialogueSequence:FindFirstChild(currentDialogue)
local currentDialogue = 1
local nextDialogue = currentDialogue + 1
local function OpenDialogue()
dialogueBox.Size = UDim2.new(0,0,0,0)
nametag.Size = UDim2.new(0,0,0,0)
dialogueBox.Visible = true
nametag.Visible = true
ts:Create(dialogueBox, TweenInfo, {Size = UDim2.new(0.443,0,0.139,0)}):Play()
ts:Create(nametag, TweenInfo, {Size = UDim2.new(0.078,0,0.46,0)}):Play()
task.wait(1)
end
local function CloseDialogue()
ts:Create(dialogueBox, TweenInfo, {Size = UDim2.new(0,0,0,0)}):Play()
ts:Create(nametag, TweenInfo, {Size = UDim2.new(0,0,0,0)}):Play()
task.wait(1)
dialogueBox.Visible = false
nametag.Visible = false
end
local function PrintDialogue(text, interval)
dialogue.Text = ""
for _, letter in pairs(string.split(text, "")) do
dialogue.Text ..= letter
task.wait(interval)
end
task.wait(0.3)
dialogue.Text = ""
end
local function PrintName(text)
name.Text = ""
end
function dialogue.IsActive()
return active
end
function dialogue.Activate(text, interval)
if active then return end
active = true
player.Character:WaitForChild("Humanoid").WalkSpeed = 0
OpenDialogue()
PrintName(text)
PrintDialogue(text,interval)
CloseDialogue()
player.Character:WaitForChild("Humanoid").WalkSpeed = 16
active = false
end```