a1nati
(RiceOfChamporado)
#1
Can anyone explain how to reverse the direction of this tween? I found this code on a post about the new updates on tweenservice.
local TweenService = game:GetService("TweenService")
local Panel = workspace.Panel
local PanelRoot = Panel.PrimaryPart
local PanelSlideInfo = TweenInfo.new() -- default settings
local PanelSlideTween = TweenService:Create(PanelRoot, PanelSlideInfo, {
CFrame = PanelRoot.CFrame * CFrame.new(PanelRoot.Size.X + 0.1, 0, 0)
})
PanelSlideTween:Play()
1 Like
a1nati
(RiceOfChamporado)
#2
I tried changing the + to a - but that didn’t work.
1 Like
Otiaks2356
(interfield3493)
#3
The tween is too complicated, you could like use this for the TweenInfo
local PanelSlideInfo = TweenInfo.new(
PutYourTime,
Enum.EasingStyle.PutYourEasingStyle,
Enum.EasingDirection.PutYourEasingDirection,
0,
true,
0
) -- default settings
That will make the tween right and completed.
You dont actually need this, you can use this:
local PanelSlideTween = TweenService:Create(PanelRoot, PanelSlideInfo, Properties)
And Here is the full script of this.
local TweenService = game:GetService("TweenService")
local Panel = workspace.Panel
local PanelRoot = Panel.PrimaryPart
local Properties = {
--Put your properties in
}
local PanelSlideInfo = TweenInfo.new(
PutYourTime,
Enum.EasingStyle.PutYourEasingStyle,
Enum.EasingDirection.PutYourEasingDirection,
0,
true,
0
) -- default settings
local PanelSlideTween = TweenService:Create(
PanelRoot,
PanelSlideInfo,
Properties
)
PanelSlideTween:Play()
Let me know if you have any problems
1 Like
a1nati
(RiceOfChamporado)
#5
Thank you very much! My problem is fixed now.
system
(system)
Closed
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.