What I am making:
So I am trying to make an elevator, but it’s an elevator that goes up and down and left and right. Well… It’s more of a high-speed transporter I guess.
What I want to know:
I am having trouble figuring out how to make this. The elevator itself is a model. I saw some threads here talking about Prismatic Constraints, but I don’t know how to make it go left and right too.
What I tried:
I tried using a loop and moving the model’s primary part so far. But my character just doesn’t stick to the ground, and it doesn’t for any moving platform I find in the tool box.
You can weld the character to the bottom of the elevator when it starts moving. The character won’t be able to move, but he/she will move along with the elevator.
@SquidyCakez Thanks for the suggestion, however, these methods feel rather old. I am going for a sci-fi look so I want to get the feel. I was hoping with this new moving platform update would fix these issues.
@C0lvy123 I feel like that would be an uncomfortable experience for players.
I am generally looking for a more developed and advanced solution. But thanks for responding!
Maybe move all players in the elevator along with the elevator itself? Example:
for i = 1, 50 do
Elevator.Floor.Position = Elevator.Floor.Position + Vector3.new(1,0,0)
--Get the players in the elevator
local Players = {}
local TouchingParts = Elevator.Floor:GetTouchingParts()
for _, Part in pairs(TouchingParts) do
if game.Players:GetPlayerFromCharacter(Part.Parent) then
table.Insert(Players, Part.Parent)
end
end
--Move the players along with the elevator
for_, Player in pairs(Players) do
Player.HumanoidRootPart.Position = Player.HumanoidRootPart.Position + Vector3.new(1,0,0)
end
end
I know Roblox physics works badly with unattached unanchored Parts/Humanoids.
I do know Aotrou (Aotrou's Portfolio (Commissions Closed)) was working on something a while ago that seemed pretty promising but I don’t know what it was for or if he was planning on sharing it with others.
As far as PrismaticConstraints go, connect one in the vertical direction to a transparent Part, for the up and down, then connect the second one to the vertically moving Part for the left/right.
Should be easy to script as long as you make sure the names of the Parts containing the PrismaticConstraint are correctly referred to in the script.
Thanks for the reply. I prefer to use tween service or something to move it so it can go anywhere, but right now the biggest problem is just the character moving everywhere. If I anchored it and tried to move it, would it work better?
I was in Aotrou’s test place for his physics test and the play was perfect and seamless. I was on a truck he was driving around and could walk and jump without getting thrown off the vehicle.
Pretty awesome.