local TweenService = game:GetService("TweenService")
local door1 = script.Parent.Parent:WaitForChild("Door")
local Cooldown = false
local Allowed = { "[SCP] A-1 Card",
"[SCP] Card-CD",
"[SCP] Card-L4",
"[SCP] Card-L5",
"[SCP] Card-Omni",
"[SCP] REDACTED"}
local tweeningInformation = TweenInfo.new(
1.3,
Enum.EasingStyle.Quad,
Enum.EasingDirection.Out,
0,
false,
0
)
local door1Open = {CFrame = CFrame.new(-10.937, 3.85, -21.814)}
local door1Close = {CFrame = CFrame.new(-5.937, 3.85, -21.814)}
local tween1open = TweenService:Create(door1,tweeningInformation,door1Open)
local tween1close = TweenService:Create(door1,tweeningInformation,door1Close)
script.Parent.Parent.KeycardReader1.Touched:Connect(function(hit)
for i, v in pairs(Allowed) do
if hit.Parent.Name == v then
if Cooldown == false then
Cooldown = true
script.Parent.DoorOpen:Play()
tween1open:Play()
wait(2)
tween1close:Play()
script.Parent.DoorClose:Play()
tween1close.Completed:Wait()
Cooldown = false
end
end
end
end)
script.Parent.Parent.KeycardReader2.Touched:Connect(function(hit)
for i, v in pairs(Allowed) do
if hit.Parent.Name == v then
if Cooldown == false then
Cooldown = true
script.Parent.DoorOpen:Play()
tween1open:Play()
wait(2)
tween1close:Play()
script.Parent.DoorClose:Play()
tween1close.Completed:Wait()
Cooldown = false
break
end
end
end
end)
https://gyazo.com/c10c98c0947ae4e92369fe2df40269bc
This happens everytime I open the door, how would I fix this?

2 comments
your rotating it......
you're