Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

auto open door script does not wrk for sme reason?

Asked by 5 years ago
local TweenService = game:GetService("TweenService")
local first = script.Parent:WaitForChild("Door1")
local third = script.Parent:WaitForChild("Door2")
local tweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local door1Open = {CFrame = CFrame.new(-21.317, 5.065, 11.321)}
local door2Open = {CFrame = CFrame.new(-6.317, 5.065, 11.321)}
local door1Close = {CFrame = CFrame.new(-16.317, 5.065, 11.321)}
local door2Close = {CFrame = CFrame.new(-11.317, 5.065, 11.321)}
local tween1open = TweenService:Create(door1,tweeningInformation,door1Open)
local tween1close = TweenService:Create(door1,tweeningInformation,door1Close)
local tween2open = TweenService:Create(door2,tweeningInformation,door2Open)
local tween2close = TweenService:Create(door2,tweeningInformation,door2Close)

script.Parent.Detector1.Touched:Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(2)
tween1close:Play()
tween2close:Play()
end)
script.Parent.Detector2.Touched:Connect(function(hit)
tween1open:Play()
tween2open:Play()
wait(2)
tween1close:Play()
tween2close:Play()
end)?
0
You are trying to create a tween with “door1” and “door2” between lines 16-19, but those don’t exist. Are you trying to use “first” and “third” instead? User#20279 0 — 5y
0
oh yea sorry i am tired so yea thx for helping. User#21499 0 — 5y

Answer this question