I modified the dialogue system to have a tweened opening!
Replace line 24 - 37 with:
function EndDialogue()
local tween = require(game.ReplicatedStorage.tween)
local goals = {
Size = UDim2.new(0.006, 0, 0.053, 0);
Position = UDim2.new(0.261, 0, 0.934, 0)
}
tween.Tween(MainFrame, 0.2, "Bounce", "InOut", goals)
wait(0.2)
GUI.Enabled = false
DialogueRunning = false
SpeakerChangeConnection:Disconnect()
end
and line 240 - 258 with
if Arg1:FindFirstChild("InitialPrompt") then
GUI.Enabled = true
local tween = require(game.ReplicatedStorage.tween)
local goals = {
Size = UDim2.new(0.321, 0, 0.324, 0);
Position = UDim2.new(0.5, 0, 0.813, 0)
}
tween.Tween(MainFrame, 0.2, "Bounce", "InOut", goals)
DialogueRunning = true
MainFrame.Title.Text = Arg1:GetAttribute("Speaker")
SpeakerChangeConnection = Arg1:GetAttributeChangedSignal("Speaker"):Connect(function()
MainFrame.Title.Text = Arg1:GetAttribute("Speaker")
end)
LoadNextExchange(Arg1.InitialPrompt)
end
As you can see it requires a module titled “tween” here is the code for the module (I did not write this module script)
local functions = {}
functions.Tween = function(Instances, Time, Style, Direction, PropertyGoals)
local function createTween(Inst, Time, Style, Direction, PropertyGoals)
if Time and Style and Direction and PropertyGoals then
local TInfo = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])
local Tween = game:GetService('TweenService'):Create(Inst, TInfo, PropertyGoals)
Tween:Play()
return Tween
end
end
if type(Instances) == 'table' then
local Tweens = {}
for i,v in pairs(Instances) do
local Tween = createTween(v, Time, Style, Direction, PropertyGoals)
table.insert(Tweens, Tween)
end
return Tweens
else
local Tween = createTween(Instances, Time, Style, Direction, PropertyGoals)
return Tween
end
end
return functions
enjoy!
edit: Not that this was a question but feel free to use this in the up coming v2.0
edit #2: these modifications assume that your current position & size of the dialogue gui are:
Size: {0.006, 0, 0.053, 0}
Position: {0.261, 0, 0.934, 0}