I have yet another CFraming problem... and yet again it has to do with doors...
--[Constants]:
local Entry = script.Parent
local D1 = Entry.L_Door
local D2 = Entry.R_Door
local CD1 = Entry.B1.ClickDetector
local CD2 = Entry.B2.ClickDetector
local Move = Entry.Motion
local Lock = Entry.Close
--[Bool Values]:
local Open = false
--[String Values]:
local TextCode = "ABCD"
--[Number Values]:
local NumCode = 1234
--[External Values]:
local Values = Entry.DoorValues
local DoorStatus = DoorValues.Status
local DoorFault = DoorValues.Fault
local InMotion = DoorValues.Moving
local CodeType = DoorValues.C_Type --[0 = No Code, 1 = Keypad, 2 = Number, 3 = Group, 4 = Specific Person/People]
--[Code]:
function MoveDoors(User)
--PromptCode(User)
if Open == false and (DoorStatus.Value ~= 4) then
DoorStatus.Value = 4
OpenDoors()
DoorStatus.Value = 2
elseif Open == true and (DoorStatus.Value ~= 3) then
DoorStatus.Value = 3
CloseDoors()
DoorStatus.Value = 1
end
end
function PromptCode(User)
if CodeType.Value ~= 0 then
--Incomplete function, I got this...
elseif CodeType.Value == 0 then
--FutureCodeToCome
end
end
function OpenDoors()
if InMotion.Value == true then return end
InMotion.Value = true
Lock:Stop()
Move:Play()
for M = 1, 60 do
D1.CFrame = D1.CFrame * CFrame.new(-0.2,0,0)
D2.CFrame = D2.CFrame * CFrame.new(0.2,0,0)
Wait(0.05)
end
Move:Stop()
InMotion.Value = false
Lock:Play()
Open = true
Wait(1.5)
end
function CloseDoors()
if InMotion.Value == true then return end
InMotion.Value = true
Lock:Stop()
Move:Play()
for M = 1, 60 do
D1.CFrame = D1.CFrame * CFrame.new(0.2,0,0)
D2.CFrame = D2.CFrame * CFrame.new(-0.2,0,0)
Wait(0.05)
end
Move:Stop()
InMotion.Value = false
Lock:Play()
Open = false
Wait(1.5)
end
CD1.MouseClick:connect(function(P) MoveDoors(P) end)
CD2.MouseClick:connect(function(P) MoveDoors(P) end)
As you may be able to tell, this is one of my newer codes... so it's more structured...

3 comments
What is the actual problem?
The door's work in offline mode, but they do not work in online mode, and I have no idea why...
I am not sure if it has to do with the fact that "DoorValues" is a configuration object... Because I have a computer/database that stopped functioning too and it stores variables via a config. obj.