I’m trying to make a tween function in my module script. But I keep getting the error “Unable to cast to dictionary”. Both scripts are below. All help appreciated!
Module Script:
module.tween = function(part, goal, duration, easingDirection, easingStyle)
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(duration, easingStyle, easingDirection, 0, false, 0)
local tween = TweenService:Create(part, tweenInfo, goal)
tween:Play()
end
Server Script:
moduleScript.tween(game.Workspace.Part, Vector3.new(-5.63, 4.25, -6.63), 1, Enum.EasingDirection.In, Enum.EasingStyle.Linear)