Im new to lua coding and I wanted to make a door that works on click so I looked up a tutorial and copied it exactly. 2 hours later I'm sure I have everything the same and his works. the error message i am getting is "position is not part of the model. here is my code
local model = script.Parent.Parent.Parent
local door = model.door
local value = script.Opened.Value
local close = model.Close
local open = model.Open
script.parent.MouseClick:Connect(function(player)
if value == false then
value = true
door.Position = open.Position
door.orientation = open.orientation
elseif value == true then
value = false
door.position = close.position
door.orientation = close.orientation
end
end)

4 comments
i have no idea why all the enters went
If you put it in a code block it will keep its form
I am new to this website how do I do that
nvm i got it