code:
local debounce = false
local open = false
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out
)
local ti2 = TweenInfo.new(2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out
)
local di = TweenInfo.new(.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out
)
local di2 = TweenInfo.new(2,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out
)
local tg = {CFrame = workspace.Technical.Door.Welds.CFrame * CFrame.Angles(0, math.rad(160), 0)}
local tg2 = {CFrame = workspace.Technical.Door.Welds.CFrame - CFrame.Angles(0, math.rad(160), 0)}
tc = ts:Create(workspace.Technical.Door.Welds, ti, tg)
tc2 = ts:Create(workspace.Technical.Door.Welds, ti2, tg2)
script.Parent.ClickDetector.MouseClick:Connect(function()
if open == false then
tc:Play()
script.Parent.DoorOpen:Play()
open = true
else
tc2:Play()
script.Parent.Doorclose:Play()
open = false
end
end)
the error is “Expected vector3, got CFrame” the code i copied the Cframe part from worked. it’s basically identical. i’m not using debounce yet.