while true do
wait(0.1)
local Door = script.Parent
local Status = script.Parent:FindFirstChild("DoorsOpen?").Value
if Status == false then
Door:PivotTo(CFrame.new(8.955, 7.85, 131.398))
end
if Status == true then
Door:PivotTo(CFrame.new(12.655, 7.85, 131.398))
end
end
When the value is set to true, the Door still does not move. No errors in output
friend I don’t know exactly the answer but the error is in:
Door:PivotTo(CFrame.new(8.955, 7.85, 131.398))
because I don’t know but what I do know is that the rest is fine
I’m going to check in my studio to see if my theory is correct and I’ll answer you in a few minutes
while true do
wait(0.1)
local Door = script.Parent
local Status = script.Parent:FindFirstChild("DoorsOpen?").Value
if Status == false then
Door:PivotTo(CFrame.new(8.955, 7.85, 131.398))
Status = true
end
if Status == true then
Door:PivotTo(CFrame.new(12.655, 7.85, 131.398))
Status = false
end
end
while true do
wait(0.1)
local Door = script.Parent
local Status = script.Parent:FindFirstChild("DoorsOpen?").Value
if Status == false then
Door:PivotTo(CFrame.new(8.955, 7.85, 131.398))
else
Door:PivotTo(CFrame.new(12.655, 7.85, 131.398))
end
end