alright since no one helps me on the free model scp doors might aswell just make this i fixed the keycard problem last time, now im working on for the doors to go up, instead, they go forward, i've looked through the whole script (i hope) to see a cframe that indicate its direction, can anyone help?
Free modeled custom SCP door
local bool = true
local bool2 = true
local clearance = {
["[SCP] Card-Omni"] = true,
["[SCP] Card-L5"] = true,
["[SCP] Card-L4"] = true,
["[SCP] Card-L3"] = true,
["[SCP] Card-L2"] = true,
["[SCP] Card-L1"] = true
}
--below might be the issue.--
local LeftDoor = script.Parent
local RightDoor = script.Parent.Parent.RightDoor
local Open = false
local OpenSound = script.Parent.DoorOpen
local CloseSound = script.Parent.DoorClose
local Debounce = false
function openDoor()
if not Debounce then
Debounce = true
if Open then
Open = false
CloseSound:Play()
Spawn(function()
for i = 1, 20 do
LeftDoor.CFrame = LeftDoor.CFrame + (LeftDoor.CFrame.lookVector * 0.1)
wait(0.03)
end
end)
Spawn(function()
for i = 1, 20 do
RightDoor.CFrame = RightDoor.CFrame + (RightDoor.CFrame.lookVector * 0.1)
wait(0.03)
end
end)
else
Open = true
OpenSound:Play()
Spawn(function()
for i = 1, 20 do
LeftDoor.CFrame = LeftDoor.CFrame - (LeftDoor.CFrame.lookVector * 0.1)
wait(0.03)
end
end)
Spawn(function()
for i = 1, 20 do
RightDoor.CFrame = RightDoor.CFrame - (RightDoor.CFrame.lookVector * 0.1)
wait(0.03)
end
end)
end
wait(2.5)
Debounce = false
end
end
script.Parent.Parent.KeycardReader1.touched:connect(function(touch)
if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then
bool = false
script.Parent.AccessGranted:play()
wait(0.75)
openDoor()
wait(3)
bool = true
elseif touch.Name == "Handle" and not clearance[touch.Parent.Name] and bool2 then
bool2 = false
script.Parent.AccessDenied:play()
wait(1)
bool2 = true
end
end)
script.Parent.Parent.KeycardReader2.touched:connect(function(touch)
if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then
bool = false
script.Parent.AccessGranted:play()
wait(0.75)
openDoor()
wait(3)
bool = true
elseif touch.Name == "Handle" and not clearance[touch.Parent.Name] and bool2 then
bool2 = false
script.Parent.AccessDenied:play()
wait(1)
bool2 = true
end
end)
Update: Just looked into CFrames in the developer thingy, couldnt find anything that worked.
