Tweening main menu scale error

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)

Position.Y.Scale, you need to specify the scale as well I believe, not just Position.Y

1 Like

Oh lol, that worked perfectly. Thanks!

1 Like

Anytime! If you have anymore issues don’t be afraid to make another post!

1 Like