-
What do you want to achieve? Understanding the purpose of the info portion.
-
What solutions have you tried so far? I’ve looked through the Engine API and I still can’t understand the purpose of info. (I’ve looked at the following)
TweenInfo
TweenService
The Code:
local info = TweenInfo.new(1,Enum.EasingStyle.Quart, Enum.EasingDirection.InOut)
local function Tween(object, value)
local OutTween = game:GetService("TweenService"):Create(object,info,{TextTransparency = value})
--Basically object; is referring to the text being created; line 15, creating the text
--info idk
--TextTransparency is the transparency levels
OutTween:Play()
end
local dialogue1 = script.Parent.whatcanI
local dialogue2 = script.Parent.goodchoice
game.ReplicatedStorage.Touch.OnClientEvent:Connect(function() -- Fires event on Interaction
if true then -- Dialogue1 Tweens
Tween(dialogue1,0)
dialogue1:TweenPosition(UDim2.new(0, 0,0.034, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quart)
wait(3)
Tween(dialogue1,1)
dialogue1:TweenPosition(UDim2.new(0, 0, 0.487, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quart)
wait(1)
end
end)
game.ReplicatedStorage.Left.OnClientEvent:Connect(function() --Fires event on leaving
if true then -- -- Dialogue2 Tweens
Tween(dialogue2,0)
dialogue2:TweenPosition(UDim2.new(0, 0,0.034, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quart)
wait(3)
Tween(dialogue2,1)
dialogue2:TweenPosition(UDim2.new(0, 0, 0.487, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quart)
wait(1)
end
end)