Hey, so I was wondering if anyone could help write a bit of code for me. I’m trying to make an elevator with a toggle system, but the two main issues I’m having are getting all of the parts in the model to move together as well as the toggle system itself. I have little to no scripting experience, so I’m really struggling to find out what to do for this. I did find a script that I was using as a temporary placeholder, but it lacked a toggle (meaning it would automatically move back up after a few seconds, trapping me) and it only moved one part instead of the entire model.
This model has six elements: Torch, Button, Statue, Base, Part, and Orb. I want to make it so that, when the Button is clicked, the entire model will move downwards a certain number of studs. Once it reaches the end, it will stay where it is until the button is clicked again, and then it will move upwards a certain number of studs. (Obviously by making those the same number, it would return to its starting position.) In terms of how fast it moves, I don’t really care if it’s super slow or not, as long as it moves somewhat fluidly. I don’t really know a lot about physics and movement in Studio, but I know there’s some kind of c-frame trick people have used in the past to make parts move. However, I remember them being pretty janky and basically teleporting to each position, so I definitely don’t want that if possible. I have some giant spinning gears in the game that doesn’t make the player spin with it while standing on it, but the player can still fall between the teeth for whatever reason, meaning that the hotboxes are obviously still updating but the physics aren’t transferring to the character for some reason. Whatever that is, I also wouldn’t want that to happen and have the elevator clip through the player, trapping them, or anything like that. (I’m also trying to fix those gears as a separate project, so if anyone could explain to me why that’s happening, I’d really appreciate it.)
I did create a model for people to use, if you’d like to try to give it a shot yourself. If you’re able to create a working version, please share a link to the model so I can use it, and I’ll credit you in the game! You can find it here: Desert Elevator - Roblox