So I am trying to tween a door with a handle and other texture parts inside of the main part, so when I tween the main part, the parts inside do not move.
local TweenService = game:GetService("TweenService")
local RightDoor = script.Parent.MainCarrier
local RightDoorButton = script.Parent.ButtonsPanel.DoorButton.ClickDetector
local DoorTargetUp = Vector3.new(5.327, 20.5, -0.354)
local DoorTargetDown = Vector3.new(5.327, 13.575, -0.354)
local DoorTweenInfo = TweenInfo.new(
0.25,
Enum.EasingStyle.Quart,
Enum.EasingDirection.InOut
)
local TweenUp = TweenService:Create(RightDoor, DoorTweenInfo, {Position = DoorTargetUp})
local TweenDown = TweenService:Create(RightDoor, DoorTweenInfo, {Position = DoorTargetDown})
RightDoorButton.MouseClick:Connect(function()
if RightDoor.Position == DoorTargetDown then
TweenUp:Play()
else
TweenDown:Play()
end
end)
Just to clarify, I have weld constraints that are welding those parts to the main part I am tweening, but they are not moving.