When I tween parts, it always go to position 0,0,0?
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(
4, -- Time
Enum.EasingStyle.Sine, -- EasingStyle
Enum.EasingDirection.Out, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local tween1 = TweenService:Create(script.Parent.Parent.Parent.Parent.Enter, tweenInfo, {Position = Vector3.new(script.Parent.Parent.Parent.Parent.EnterPos1.Position)})
local tween2 = TweenService:Create(script.Parent.Parent.Parent.Parent.Enter, tweenInfo, {Position = Vector3.new(script.Parent.Parent.Parent.Parent.EnterPos2.Position)})
There are no errors in output? Could anyone help me?
Check the position of your parts. Also, I assume you’re tweening Enter to the position of EnterPos? Perhaps try removing the Vector3 and index position like so: Also, are your parts anchored? {Position = script.Parent.Parent.Parent.Parent.EnterPos1.Position})
You don’t need that for TweenService.
OP is probbably having problem with part being rotated and moved to 0, 0, 0 he needs to use CFrame insead vector3 for that.