Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer

You forgot the comma between

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

and

"Out"

1 comment

0

thanks~

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")

This discussion is preserved as it was. New answers, comments, and votes are closed.