How would i get this tween faster?

Im making tween movement, but i want this to go faster, because its going slow, any help would be appreatiated, thanks :smiley:

Code:

local TweenService = game:GetService("TweenService")
 
local part = script.Parent
local start = script.Parent.Position

local goal = {}
goal.Position = Vector3.new(73.149, 12.707, 83.47)

while wait() do
	temp = start
	local tweenInfo = TweenInfo.new(30)
 
	local tween = TweenService:Create(part, tweenInfo, goal)
 
	tween:Play()
end

The number 30 inside tweenifo.new() is the time it takes for the tween to play.

Change the number 30 to be a smaller number

1 Like

Oh ok. Thanks, i will try this now.

Try this:


local TweenService = game:GetService("TweenService")
 
local part = script.Parent
local start = script.Parent.Position

local goal = {}
goal.Position = Vector3.new(73.149, 12.707, 83.47)

while wait() do
	temp = start
	local tweenInfo = TweenInfo.new(
3,
'Linear'
'Out'
0,
false,
0
)
 
	local tween = TweenService:Create(part, tweenInfo, goal)
 
	tween:Play()
end

Thanks you, i am not very good with tween.

Not defining each Tween Info parameter is bad practice I think… To be on the safe side, always define every parameter.

One thread mentioned that not defining all the parameters causes their tween to slow down. Since then I always have included all the parameters.

Add a 4th parameter, like ,1 which makes it tween in 1 second

What if… I set the " tweenifo.new() " empty, and it’s not smooth enought for me. Can somebody please help me with this?

The default tween time when you have TweenInfo.new() empty is 1 second. If you want your tween to go quicker you can do:
TweenInfo.new(.1) (this is a tween that takes .1 seconds)`

Here’s an example with all the different parameters tweeninfo can use if you’re interested in using those:

TweenInfo.new (
    .1, -- tells the tween to run for .1 seconds
    Enum.EasingStyle.Quad, -- sets the tween animation type (see all animation types here https://dk135eecbplh9.cloudfront.net/assets/blt164bc3fd53630e3a/Easingstyle.gif) 
    Enum.EasingDirection.Out, -- sets which direction you want the tween to go (Out means at the endof the tween, in means at the beginning)
    0, -- sets the number of times you want your tween to repeat
    false, -- sets whether or not you want the tween to reverse
    0, -- sets how many seconds you want to wait before starting your tween
)