Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make TweenPosition work? (Attempt to call a UDim2 value)

Asked by 3 years ago
button.MouseButton1Click:Connect(function()
    menu:TweenPosition(UDim2.new(0,0,0,0)"Out","Quart","0.5")
end)

That's the script I tried, when a button is pressed, the menu should move up, but instead, thee output shows:

Players.SuperLittleAdmin.PlayerGui.ScreenGui.Menu.Start.Start Button:15: attempt to call a UDim2 value

Can anyone help?

2 answers

Log in to vote
0
Answered by 3 years ago

You forgot the comma between

UDim2.new(0,0,0,0)

and

"Out"
0
thanks~ SuperLittleAdmin 257 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

You forgot a , between UDim2.new(0,0,0,0) and "Out".

It should be

menu:TweenPosition(UDim2.new(0,0,0,0),"Out","Quart","0.5")

Answer this question