So I am making a Main Menu and when you press Play the menu parts tween off the screen.
The issue is that I am using [OBJECT].Position.Y
to move it so I don’t have to keep updating the Y value. The problem is that it is the offset a bit odd, it moves diagonally.
This is what happens (keep watching if you dont notice first time) ^
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(1.5)
local MainMenu = script.Parent
local PlayButton = MainMenu.PlayButton
local TeamSelectionFrame = MainMenu.TeamSelectionFrame
local GameName = MainMenu.GameName
local Camera = workspace.CurrentCamera
local Alarm = script.Alarm
local MainTheme = script.MainTheme
Alarm:Play()
MainTheme:Play()
local TweenAlarm = TweenService:Create(Alarm.Volume, Info, {Volume = 0})
local TweenMainTheme = TweenService:Create(MainTheme.Volume, Info, {Volume = 0})
PlayButton.MouseButton1Click:Connect(function()
spawn(function()
TweenAlarm:Play()
TweenMainTheme:Play()
end)
TeamSelectionFrame:TweenPosition(UDim2.new(2, 0, TeamSelectionFrame.Position.Y, 0), "In", "Sine", 0.6)
GameName:TweenPosition(UDim2.new(-2, 0, GameName.Position.Y, 0), "In", "Sine", 0.6)
PlayButton:TweenPosition(UDim2.new(-2, 0, PlayButton.Position.Y, 0), "In", "Sine", 0.6)
wait(1)
Camera.CameraType = Enum.CameraType.Custom
end)