I want Achieve this UI tween for the changing pages of the uis… i have no idea how to make it work…
What is the issue?
I cant find any tutorials about this i can find only how to change pages of the ui just with visible property so i want ask if this is possible to make?
What solutions have you tried so far?
I tried everything youtube,devforum,developer hub but i cant find any solutions for my problem…
To start make a frame and set it to be invisible. Make sure ClipsDescendants is turned on.
Now place this where the UI should tween into view. Add your UI inside this frame and move it down by setting its position on the Y.Scale axis to 1.
In the script when a button is pressed use this tween:
Coming into view
local invisibleframe = script.Parent.Frame -- Location of this invisible frame. -- The invisible frame.
local selectedFrame = invisible["Frame Name"] -- The frame you want to tween.
local TweenService = game:GetService("TweenService") -- Tween service
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) --Tween Info
local goal = { -- Moving into view
Position = UDim2.new(invisibleframe.SelectedFrame.Position.X.Scale, 0, 0, 0)
}
local Tween = TweenService:Create(selectedFrame, Info, goal)
Tween:Play()
Going out of view
local invisibleframe = script.Parent.Frame -- Location of this invisible frame. -- The invisible frame.
local selectedFrame = invisible["Frame Name"] -- The frame you want to tween.
local TweenService = game:GetService("TweenService") -- Tween service
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut) --Tween Info
local goal = { -- Moving into view
Position = UDim2.new(selectedFrame.Position.X.Scale, 0, -1, 0)
}
local Tween = TweenService:Create(selectedFrame, Info, goal)
Tween:Play()
wait(0.5)
selectedFrame.Position = UDim2.new(selectedFrame.Position.X.Scale, 0, 1, 0) -- Resets position
Yea it’s exactly what I meant, you can change some stuff with some creative ideas and clean it up a bit but at line 2 change Invisible to invisibleFrame
woah i never expected i dont need script this… tysm you are amazing… i have last one question how i can connect UiPageLayout to button so i dont need to use wheel on the mouse to change the page?