Hi,
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new()
local d1 =script.Parent.Parent:WaitForChild("d1")
local d2=script.Parent.Parent:WaitForChild("d2")
local info=TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
0,
false,
0
)
local CFrameValue1 = Instance.new("CFrameValue")
local CFrameValue2 = Instance.new("CFrameValue")
CFrameValue1.Value = d1:GetPrimaryPartCFrame()
CFrameValue2.Value = d2:GetPrimaryPartCFrame()
local d1open = {Value = CFrame.new(-15.4, 4.5, -23.9)}
print(d1open)
CFrameValue1:GetPropertyChangedSignal("Value"):Connect(function()
d1:SetPrimaryPartCFrame(CFrameValue1.Value)
end)
CFrameValue2:GetPropertyChangedSignal("Value"):Connect(function()
d2:SetPrimaryPartCFrame(CFrameValue1.Value)
end)
local tween = tweenService:Create(CFrameValue1, info, d1open)
script.Parent.ClickDetector.MouseClick:Connect(function()
tween:Play()
end)
--local tween = tweenService:Create(CFrameValue1, info, d1open)
--tween:Play()
tween.Completed:Connect(function()
CFrameValue1:Destroy()
end)
https://gyazo.com/55c391583f19141cdbecde5c1921757c
(I'm only using one door at the moment until I can get it working properly) As you can see, the doors orientation rotates to (0,0,0) whereas I do want this to happen, only for the door to slide to the position I've given it. Any idea how I can fix this? Thanks.

1 comment
lerp