"Unable to cast to Dictionary" error when creating tweens

I’m trying to make a tweened sliding door, and when trying to create a tween it gives me an error in output saying only “Unable to cast to Dictionary”, which when clicked on, leads to the line of code in the door script below:

local opentween1 = tweenservice:Create(door1.Primary.Position, Info, script.Parent.DoorOneOpen.Position)

Here is the tween info (“Info” in the above line):

local Info = TweenInfo.new(2.3,Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0)

For reference, here is an image of the door in Explorer:
I’ve tried finding solutions for this problem, but no other post I’ve found seems to fix it or match the situation I have. Its difficult, as i have a basic understanding of scripting, and I’ve been trying to get better at it for games I’m making.
If anybody has a solution to this problem, I’d be willing to hear it. Thanks!

On the tween that you created, everything is correct besides the position. It needs to be put inside of a table like so:

{Position = — position here}

Also the first parameter in the tween create has to be an INSTANCE. Not a position (Vector3 value)

The first parameter should be an instance not a vector so remove the .position

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.