Automatic doors for gondola cabins (ski lift)

Would anyone know how to make the doors of some gondolas open specifically in a specific area, and close when they leave that area?

I appreciate any help you can provide.

How are you moving the gondolas?
If you have them travelling on a PrismaticConstraint you can read the CurrentPosition property in a loop (or a function that runs when the constraint position changes) then script the doors to open when the CurrentPosition is inside that area.
Another way is to Anchor a transparent CanCollide false Part at the area you want the doors to open and use GetPartsInPart to check to see if one of the gondola parts is in that part.

or have it the other way around… the detect part on the gondola, when it detects hitting another part where you want to have the doors open, open the doors, have a flag that the doors are open (so you don’t keep trying to open the door) , then when the gondola moves and detects a closed door part, close the doors… set the flag to closed. (basically the same thing Scottifly said…)

1 Like

they are moved by a cframe script that moves the models. the scripts are in the cables.

the problem is that I don’t know much about scripting of that type

Have you asked the Roblox Studio , Assistant, any questions?

Many times. also with other types of AI Chat, like chatgpt but nothing.

what code script are you running right now just to open the doors? do you have that running first? there are tons of open source resources that do doors…

like this search, looking at the results there are at least 5 different door systems…

https://devforum.roblox.com/search?expanded=true&q=open%20door%20after%3A2022-06-07%20%23resources

start looking at the code and breaking it apart… add print debug statements to know when it is getting in to sections of code, specifically before and after IFs, onconnects, inside and outside of loops…

get pieces of what is needed, then figure out how to piece if all together…

if you do not have one yet, perhaps look at one that has a prompt to open…

then you should be able to change that prompt to instead be triggered by the touched part, add a if touched part is open, run the open door code.

if part is closed part close them…

you could first just try it out on one of the working doors by manually moving the Open part into where the touched part is at , to see if the detection works…

if you try doing some of the above and still need help, let me know… I’ll help you… it should not be that complex … (unless when the moving gondola adds some challenge… )

1 Like

Hey, I don’t have any script to open the doors. Since they are only the right and left door models.

By the way, would you pass me your discord to continue talking there?

ok I sent you a private msg to your messages…

Doors can be moved by scripting in a few ways:

  • tweening for the Weld Positions between 2 unanchored parts.
  • tweening anchored Parts through CFRames.
  • using PrismaticConstraints for the doors. This also allows a physical interaction with players.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.