Need a little help on this one. I'm assuming this isn't working because of my horrendous attempts at making a few tables out of this clutter but if there is another issue please help a guy out :) Note: I am unaware if I can use .Position or .CFrame on a table
local OutsideHandle = script.Parent.OutsideHandle
local InsideHandle = script.Parent.InsideHandle
local Frame = script.Parent.Frame
local Door = {"OutsideHandle", "InsideHandle", "Frame"}
local OpenInsideHandle = script.Parent.OpenObjective.OpenInsideHandle
local OpenOutsideHandle = script.Parent.OpenObjective.OpenOutsideHandle
local Open = script.Parent.OpenObjective.Open
local OpenObjective = {"OpenOutsideHandle", "OpenInsideHandle", "Open"}
local ClosedInsideHandle = script.Parent.ClosedObjective.ClosedInsideHandle
local ClosedOutsideHandle = script.Parent.ClosedObjective.ClosedOutsideHandle
local Closed = script.Parent.ClosedObjective.Closed
local ClosedObjective = {"ClosedInsideHandle", "ClosedOutsideHandle", "Closed"}
local Click = Instance.new("ClickDetector",script.Parent.Frame)
Click.MaxActivationDistance = 10
Click.MouseClick:Connect(function()
if Door.Position == ClosedObjective.Position then
Door.Position = OpenObjective.Position
Door.CFrame = Door.CFrame * CFrame.Angles(0, 0, math.rad(-100))
print("Door opened")
else
Door.Position = OpenObjective.Position
Door.Position = ClosedObjective.Position
Door.CFrame = Door.CFrame * CFrame.Angles(0, 0, 0)
print("Door closed")
end
end)

3 comments
u cant
Ok thx
Technically you can but it would be a rather inefficient method