Only buttons of my elevator are moving

I want to make an elevator which can send the player onto different floors. There are only 2 floors I need for this elevator.

local elevators = workspace.Elevators
	if elevators.Elevator.Floor.Value == 1 and elevators.Elevator.currentlyMoving.Value == false then
		elevators.BottomDoors.BottomLeftDoor.Anchored = false
		elevators.BottomDoors.BottomRightDoor.Anchored = false
		elevators.BottomDoors.BottomLeftDoor.BodyPosition.Position = elevators.BottomDoors.BottomLeftDoorClosed.Position
		elevators.BottomDoors.BottomRightDoor.BodyPosition.Position = elevators.BottomDoors.BottomRightDoorClosed.Position
		elevators.BottomDoors.BottomLeftDoor.Anchored = true
		elevators.BottomDoors.BottomRightDoor.Anchored = true
		elevators.Elevator.currentlyMoving.Value = true
		elevators.Elevator.UpPart.Anchored = false
		elevators.Elevator.DownPart.Anchored = false
		elevators.Elevator.Elevator.Anchored = false
		elevators.Elevator.UpPart.CanCollide = false
		elevators.Elevator.DownPart.CanCollide = false
		elevators.Elevator.Elevator.BodyPosition.Position = elevators.UpElevatorModel.Elevator.Position -- DOES NOT RUN
		elevators.Elevator.UpPart.BodyPosition.Position = elevators.UpElevatorModel.UpPart.Position
		elevators.Elevator.DownPart.BodyPosition.Position = elevators.UpElevatorModel.DownPart.Position
		elevators.Elevator.UpPart.Anchored = true
		elevators.Elevator.DownPart.Anchored = true
		elevators.Elevator.Elevator.Anchored = true
		elevators.Elevator.UpPart.CanCollide = true
		elevators.Elevator.DownPart.CanCollide = true

There are only 2 buttons in the elevator, one “Up” and one “Down”. The buttons are teleported, but the elevator’s position doesn’t change. List of stuff:
Workspace - Workspace
Workspace.Elevators - A folder named Elevators in the workspace
Workspace.Elevators.Elevator - A model of the whole entire elevator in the folder
Workspace.Elevators.Elevator.Elevator - A Union Block I Created, which is the elevator itself (The other items in the Elevator Model are the buttons)
UpElevator Model and DownElevator Model are just the start and end positions for teleporting the block. (Moving) I’ve tested the code with print statements and every line runs without errors.

I am editing the code for neatness later, for now I am just trying to get it to work

If you are reading this, this isn’t an “idea” post, I need help getting the elevator to work :expressionless: The elevator isn’t teleporting, but the buttons are.

Is it possible to have a model of the elevator?

The full model of the elevator includes the Elevator itself, and the buttons inside. The elevator inside of the elevator model is the actual block that doesn’t move, but Someone already helped me solve it in the other post. :slight_smile:

1 Like