Hello, i’ve recently started Scripting and while I was following a Tutorial from AlvinBlox to make a sliding door, However i encountered an error and i have tried all in my power to fix it. So I’d like to know if you guys could help me
Code:
local TweenService = game:GetService(“TweenService”)
local door1 = game.Workspace[“S.Door”].Door1
local door2 = game.Workspace[“S.Door”].Door2
local TweeningInformation = TweenInfo.new{
.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
}
local door1close = (CFrame = CFrame.new(-68.06, 5.25, 19.753))
local door1open = (CFrame = CFrame.new (-76.06, 5.25, 19.753))
local door2open = (CFrame = CFrame.new(-52.122, 5.25, 19.753))
local door2close = (CFrame = CFrame.new(-59.997, 5.25, 19.753))
local tween1open = TweenService:Create(door1,TweeningInformation,door1open)
local tween1close = TweenService:Create(door1,TweeningInformation,door1close)
local tween2open = TweenService:Create(door1,TweeningInformation,door2open)
local tween2close = TweenService:Create(door1,TweeningInformation,door2close)
script.Parent[“Detector 1”].Touched.Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(5)
tween1close:Play()
tween2close:Play()
end)
script.Parent[“Detector 2”].Touched.Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(5)
tween1close:Play()
tween2close:Play()
end)
The Problem:
Thanks in advanced