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

Why am I getting this error while using TweenPosition?

Error: Error in script: unexpected symbol near '?'

Code:

open.MouseButton1Down:connect(function()
Main.Visible = true
	 Main:TweenPosition(UDim2.new(0,60,0,168), 'Out', 'Bounce', 1, true)
	open.Visible = false
	close.Visible = true
end)


close.MouseButton1Down:connect(function()
Main.Visible = false
	 Main:TweenPosition(UDim2.new(0,-500,0,168), 'In', 'Linear', 1, true)
	open.Visible = true
	close.Visible = false
end)

2 comments

0

Just wondering but don't you need using Enum.EasingStyle and Enum.EasingDirection for 'In', 'Linear', 'Out' 'Bounce'?

0

use Connect, not connect.

1 answer

✓ Accepted answer

:Visible is not a method, even if it was, it requires a parenthesis. Replace the colon (:) with a dot to fix it.

3 comments

0

That fixed that problem, but now I got an other error.

0

I have updated the original question with the new error.

0

Click the error to locate the source.

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