Hello, I’m trying to make a tween module to make tweeting models/parts easier for myself. The issue I’m having is that when I go to create the tween, I’m getting the following error within the output, Unable to cast to Dictionary
. However, I’m using the correct syntax, and not a single value I pass into the function is incorrect. Here’s the code snippet:
local suppliedInformation = TweenInfo.new(
tweenTime,
tweenType,
Enum.EasingDirection.Out
);
local isCurrentlyBeingTweened = tweenObject:FindFirstChild('currentlyMoving') or Instance.new('BoolValue');
isCurrentlyBeingTweened.Name = 'currentlyMoving';
isCurrentlyBeingTweened.Parent = tweenObject;
repeat wait() until not isCurrentlyBeingTweened.Value
local tweenEndPosition = calculateEndPosition(tweenObject,tweenDirection);
local completedTween = TweenService:Create(tweenObject,suppliedInformation, tweenEndPosition);
Here’s whats printed into console if I individually print each value:
21:49:50.308 - tweenstuff
21:49:50.309 - Time:1 DelayTime:0 RepeatCount:0 Reverses:False EasingDirection:Out EasingStyle:Linear
21:49:50.310 - -2.00195503, 2.40860224, 12.5956001
Here’s what I’m putting into the console to call the function from the module,
require(game.ReplicatedStorage.Modules.tweenModule):createTween({object = game.Workspace.tweenstuff,direction = 'left',length = 1, type = Enum.EasingStyle.Linear})
Any and all help is appreciated!