It's sort of hard to explain, but I want to make one of those things that when you pull down on the trapped door, a ladder extends outwards for you to go into the attic. I have it to where if you press 'F' the trapdoor comes down, but I can't figure out how to make the second part extend like a ladder. I know it isn't much of a script, but I was wondering why this wasn't working. I tried to make it see when the main part is already rotated (after the trapped door opens) and then run a piece of the script to make the ladder come down.
local ladder = script.Parent
if script.Parent.MainPart.Position = Vector3.new(39.778,7.378,-12.766) then
wait(.5)
for i = 0,1,.001 do
ladder:SetPrimaryPartCFrame(ladder:GetPrimaryPartCFrame() * CFrame.new(0,0,-i))
wait()
end
Thanks!

2 comments
???
Sorry, I'm not the best at explaining. I may be doing this way too complicated than it should be done, but I made a basic CFrame script to open a door when you press E. There's a ladder connected to it that i want to extend after the player opens the door. Let me know if you have further questions