Hello ,
I’m trying to make a tween work with a look vector, however, instead of tweening to the desired position, it just teleport. Any help is appreciated.
My code:
-- Doors
local left = script.Parent.Parent.Left
local right = script.Parent.Parent.Right
-- Services
local TweenService = game:GetService("TweenService")
-- Config
local Config = require(script.Parent.Parent.Configuration)
-- Tablet position.
local Tablets = script.Parent.Parent.Tablets
-- UI Buttons
local Lock = Tablets:GetDescendants("Locked")
local ForceOpen = Tablets:GetDescendants("Force Open")
local ForceClose = Tablets:GetDescendants("Force Close")
local FireMode = Tablets:GetDescendants("Fire Mode")
local Hold = Tablets:GetDescendants("Hold")
-- Player Detection
local PlayerDetection = script.Parent.Parent.PlayerDetection
local DetectPart = PlayerDetection:GetDescendants()
-- Tweens
local TweenLInfo = TweenInfo.new(
10, --Time
Enum.EasingStyle.Linear, -- Style of door open animation
Enum.EasingDirection.In, -- Direction of easing.
-1, -- Repeat count.
false, -- Will it reverse?
0 -- The delay time.
)
-- open look vectors
wait (10)
local LTween = TweenService:Create(left, TweenLInfo, {Value = left:SetPrimaryPartCFrame(CFrame.new(left.PrimaryPart.CFrame.lookVector * 14))})
LTween:Play()
I tried welding them, however, it still just dragged the one part. Are there any good plugins for a weld? The plugin I used seems to break it but im not sure.
Well it’s moving diagonally no matter what i change the position to, even if i use rightvector etc so - would only make it move the opposite way diagonally. I need it to move left (in terms of the buildings angle) in which i’d reverse the lookvector however for some reason the lookvector is going diagonal.