How to do the opposite of a tween

CC and target show be swapped around it should be: cc, set, target

For Example: local tweenStart = TweenService:Create(cc, set, target)

CC and target show be swapped around it should be: cc, set, target

I think he said he just switched then back.

this is the code, i swapped around the target and cc because I want target (which is the BlackMarketCamera) to the current camera of the player. That is the issue

I see, if I helped with my previous code in any way, and you donā€™t need any more help, then I would appreciate you marking my answer as a solution.

yes, you are correct, but the line is giving me the error the unable to cast to dictionary. How can I solve that annoying probleM?

I think you need to put CFrame in brackets like the : [ā€œCFrameā€]

I think that gives an error, if im not mistaken

The first argument of TweenService:Create() is Instance. Which tries to get the part that is being moved, for example: game.Workspace.Part. The second argument is the TweenInfo, but you already have that coded correctly. The third argument (the one I think you are having errors with) is the property table. Unable to cast to dictionary means that this argument isnā€™t a dictionary. So try setting your property table to that last argument, because that is the only possible issue.

In summary, something like this in the end (not exact):

CameraObject = game.workspace.CurrentCamera
ValueTable = {CFrame = workspace.BlackMarketCam.CFrame}
TweenService:Create(CameraObject, TweenInfo.new(), ValueTable)
1 Like

Actually I think see your problem if that doesnā€™t work, try this:

ValueTable = {CFrame = game.Workspace.BlackMarketCam.CFrame}

Instead of:

ValueTable = {CFrame = workspace.BlackMarketCam.CFrame}
1 Like

That would technically work, but the current works just well, I have worked with tweens countless times before.

Thanks! Due to the explanation, I figured how to correctly solve this problem of mine

1 Like

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