tweenAll
(Jam)
August 28, 2021, 8:12pm
#1
I’m trying to tween this gui position for an intro, but its not tweening when I click the button. Here is the script.
local gui = script.Parent.Parent
local button = script.Parent
local tweenservice = game:GetService("TweenService")
button.MouseButton1Click:Connect(function()
gui:TweenPosition(UDim2.new({0, 0},{1, 0}), Enum.EasingDirection.In, Enum.EasingStyle.Back)
gui.Visible = false
end)
Here is the explorer.
C_Sharper
(Sharpie)
August 28, 2021, 8:14pm
#2
Super close.
When you create UDims, you don’t actually pass in tables as arguments for that. Instead, you pass in 4 numbers to act as the scale and offset values. I know, it’s a bit misleading how it’s formatted on the Properties window.
Try this instead:
gui:TweenPosition(UDim2.new(0, 0, 1, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 2)
1 Like
tweenAll
(Jam)
August 28, 2021, 8:15pm
#3
Ahhh, thank you. I didn’t know that and just copy pasted the position box thank you!
1 Like