Model Tween (Position,Orientation and Scale)

Hello fellow developers!! :grinning_face_with_smiling_eyes: :wave:

Today i want to showcase an project of mine which tweens models using nothing complicated
I know u can tween model CFrame which can basically set model Orientation and Position. But I still made orientation and position

Here is some showcase:


Currently the module is far from perfect and there are issues i need to fix
the biggest problem currently is that tweening the same model twice at the same time will result model deformation so make sure u wait TweenTime before tweening the same part again

How to use:

module.TweenModulePosition(Model,Tweeninfo,Position) -- for position
module.TweenModuleScale(Model,Tweeninfo,Size) -- for scale (Size MUST BE A NUMBER)
module.TweenModuleOrientation(Model,Tweeninfo,Orinetation) -- for orientation
module.TweenModuleTransparency(Model,Tweeninfo,Transparency) -- number
module.TweenModuleColor(Model,Tweeninfo,Color) -- Color3

Here is the model
https://www.roblox.com/library/8175196986/ModelTween

Expect updates
Current ver 1.11

New update 1.11

  • Completely revamped the Position and Scale tween (They dont use third party instances)(Will probably implement for orientation too)
  • Added 2 new functions. TweenModuleTransparency and TweenModuleColor. Self explanatory.
  • Reduced lag and made it work without PrimaryPart
97 Likes

Very useful makes work much easier!

2 Likes

This is cool, but you should probably utilize the new task library instead of using wait and spawn. Their new versions are task.wait and task.defer (task.spawn is an enhanced fastSpawn, which is not what youโ€™re using). The task library is basically just enhanced versions of the old methods.

5 Likes

Good idea and incredibly useful! Thank you for the addition to the category! :slight_smile:

Thanks i totally forgot that wait and spawn are deprecated
i already made the changes

Consider changing TweenModuleSize to TweenModuleScale

3 Likes

oof yea i will change that real quick (d0ne)

2 Likes

image

TweenModule:TweenModulePosition(PickedMap,TweenInfo.new(5,Enum.EasingStyle.Linear),Vector3.new(0, -8, 0))

can you help?

1 Like

its

TweenModule.TweenModulePosition(PickedMap,TweenInfo.new(5,Enum.EasingStyle.Linear),Vector3.new(0, -8, 0))

The functions is not a method so u need to use .

1 Like

Oh yeah, thank you so much. I forgot itโ€™s a module lmao

Nice resource - however, a few suggestions:

More functions would be great, such as :TweenTransparency, or :TweenColor. These are pretty easy to implement for advanced scripters, but would make the module that much more useful.

3 Likes

Thanks for the idea. Iโ€™ve implemented it

1 Like

How do I define module in module.TweenModuleScale(Model,Tweeninfo,Size)? Thank you.

1 Like

put the module in replicated storage and add this at the top of your code

local module = require(game:GetService("ReplicatedStorage"):WaitForChild("TMmoduleV2"))
1 Like

Thank you, the tween works now, but it keeps repeating on endโ€ฆ
My script is

local module = require(game:GetService("ReplicatedStorage"):WaitForChild("TMmoduleV2"))
local Tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 1, false, 3)
module.TweenModuleScale(script.Parent,Tweeninfo,5) 

2 Likes
local module = require(game:GetService("ReplicatedStorage"):WaitForChild("TMmoduleV2"))

local Tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 3)

module.TweenModuleScale(script.Parent,Tweeninfo,5) 
task.wait(5)
script:Deestroy()
2 Likes

must me a bug, will check when iget back home

2 Likes

found what the issue is, its not a problem with the module, you made the tween info loop it :smile:

2 Likes

How would I tween a model to gradually move up, while keeping itโ€™s X and Z coordinates fixed?

1 Like

by doing this

local MyModel = workspace.Model

local ModelTween = require(script.TW2module)
ModuleTween.TweenModulePosition(MyModel,Tweeninfo.new(10),ModelTween:GetPivot() + Vector3.new(0,20,0))

Something like this

2 Likes