hey guys, I would like to share with y’all a quick and simple tweening module that I made
this module allows you to create a tween on command, and psst, no extra variable declaration fluff needed! ![]()
Quick & Simple Tweens with SwiftTween!
this module is meant to be simple, so it showcases 2 features:
1. swiftTween:CreateTween()
this is the meat of the module! it allows you to create a tween using only one call, and the parameters will go into the brackets, as shown below:
(one more thing to note, the “yield” parameter asks if you want to wait for the tween to finish before continuing with the next line of code)
swiftTween:CreateTween(instance, tweenTime, easingStyle, easingDirection, repeatCount, reverses, delayTime, propertyGoal, yield)
Another variation (more clean and readable, but long)
swiftTween:CreateTween(
instance,
tweenTime,
easingStyle,
easingDirection,
repeatCount,
reverses,
delayTime,
propertyGoal,
yield
)
Example:
local swiftTween = require(game.ReplicatedStorage:WaitForChild("SwiftTween"))
local part = workspace.Part
--accepts BOTH strings and Enums for the easeStyle and easeDirection
--goin' up!
swiftTween:CreateTween(part, 3, "Linear", "In", 0, false, 0, {Position = part.Position + Vector3.new(0, 3, 0)}, true)
--comin' back down!
swiftTween:CreateTween(part, 3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0, {Position = part.Position - Vector3.new(0, 3, 0)}, true)
2. debugMode
wondering why your tween isn’t tweening? well, debugMode will allow you to detect what is actually going into the parameters, it could be a simple screw up by you, or rubbish parameters sent by exploiters!
for this to work, you must go into the module and change the boolean:
--// Debugging area
local debugMode = false --Change this value!
Link to the module:
I hope this module helps, it is free for public use, but if possible, please credit me ![]()
