local moveblock = TweenService:Create(block, TweenInfo.new(3, Enum.EasingStyle.Linear), {Position = blockcheckpoint.Position})
moveblock:Play()
print('playing tween')
moveblock.Completed:Wait()
print('end tween')
when I play that it tween, it prints playing tween, waits 3 seconds and then tweens. after it prints end tween, it almost instantly teleports it to the next spot but you can still see it tween. Is there any way to make it slowly move to the next position in the 3 seconds?
local moveblock = TweenService:Create(block, TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Position = blockcheckpoint.Position})
moveblock:Play()
print('playing tween')
moveblock.Completed:Wait()
print('end tween')
You didn’t specify an “EasingDirection”.
1 Like
is there a way to do it without easing direction? i looked at the easing direction options and it looks like it makes it change speed.
just tested easing direction and it still does the ame thing
kan3k1_60
(Caesar)
November 15, 2021, 9:13pm
#5
Or you make the blockcheckpoint closer or you put more seconds
Snipping this post, wrong thread.
ive tried making the seconds longer but it just waits longer before it tweens and still tweens fast like what its currently doing
1 Like
I think it might have to do with the :Wait() but I’m not sure. Try maybe connecting a function?
Also, the tweeninfo defaults to easing style linear and easing direction.out so you just need to put 3 in there.
kan3k1_60
(Caesar)
November 15, 2021, 9:32pm
#9
I’ll use your script in my roblox studio and try to fix it
would you need me to provide more of the script?
without the :Wait() it doesnt wait 3 sec before tweening but it still tweens to the next position in like .2 sec or smth
kan3k1_60
(Caesar)
November 15, 2021, 9:42pm
#12
I think yes because it looks normal for me:
kan3k1_60
(Caesar)
November 15, 2021, 9:44pm
#13
If you send would be really helpful
local speed = EnemyData[tostring(entity)].speed
while reachedend == false do
local nextpath = path:GetChildren()
if (#nextpath > 0) then
path = nextpath[1]
local pathparent = path.Parent
local distance = (pathparent.Position - path.Position).Magnitude
--distance*defspeed*speed (supposed to replace the 3
local movetween = TweenService:Create(entity, TweenInfo.new(3), {Position = nextpath.Position})
movetween:Play()
print('playing tween')
movetween.Completed:Wait()
print('finished')
else
reachedend = true
print('reached end')
end
end
1 Like
kan3k1_60
(Caesar)
November 15, 2021, 10:12pm
#15
How many children do the path have? Edit: Sorry for the late answer
Wait so you’re tweening the position of the entity to next path, which is a table. Because next path is path:getchildren() which returns a table
1 Like
kan3k1_60
(Caesar)
November 15, 2021, 10:16pm
#17
It is a table if path have more than 1 children
kan3k1_60
(Caesar)
November 15, 2021, 10:17pm
#18
Oh it isn’t, getchildren is a table same if there’s just 1 children
1 Like
kan3k1_60
(Caesar)
November 15, 2021, 10:18pm
#19
It’s like {Position = path:GetChildren().Position}
Edit:
BulletproofVast:
when I play that it tween, it prints playing tween, waits 3 seconds and then tweens. after it prints end tween, it almost instantly teleports it to the next spot but you can still see it tween. Is there any way to make it slowly move to the next position in the 3 seconds?
You should specify to which part you want tween