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

Why am I getting this error while using TweenPosition?

Asked by 6 years ago
Edited 6 years ago

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)
0
Just wondering but don't you need using Enum.EasingStyle and Enum.EasingDirection for 'In', 'Linear', 'Out' 'Bounce'? User#18043 95 — 6y
0
use `Connect`, not `connect`. Thundermaker300 554 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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

0
That fixed that problem, but now I got an other error. AverageHackerman 0 — 6y
0
I have updated the original question with the new error. AverageHackerman 0 — 6y
0
Click the error to locate the source. User#18043 95 — 6y
Ad

Answer this question