How to make an Excursion Funnel system

Hello everyone! :wave::slightly_smiling_face:

I was wondering how I could make a part that, when you enter it, the part holds you in the air, but simultaneously pushes you forward. However, when you move (with W, A, S, or D), you will fall out of it.

I got this idea from the Portal 2 Excursion Funnels (shown in the video below)

Any tips on how I could achieve this the best?

From how I look at this you would need these forces:

  • anti gravity force upwards force strong enough so that whatever is in the funnel hovers (like it’s in zero gravity)
  • center force force that pushes things to the center of the funnel so they don’t fall out (should be weak, so that you can just walk out) (maybe disable while the player is pressing movement keys)
  • forwards force force that pushes in the direction of the funnel
  • drag force force that pushes in the opposite direction of the thing entering it (so that you slow down when you fly into it like in the video)

Enable these once something enters the funnel and you should have a similar effect.

1 Like

Are all these things done with VectorForce?

How I would do personally is by using AlignPosition since it basically glues the player to an attachment, now this is optional but I would personally code it on the client so the control on the funnel would feel fluid and not laggy.

  1. Whenever the player enters the funnel an AlignPosition will be created, attached to the player’s character and moved along the funnel.

  2. Whenever the player presses W, A, S or D the AlignPosition would be offset to the sides accordingly and if a certain offset value is surpassed, like 10 studs or more, the AlignPosition is deleted and the player is freed from the funnel!

Hopefully this is helpful!

Notes
  1. I would personally use os.clock() or tick() to slowly offset the player while they are holding WASD and multiply it if it feels too slow.

  2. Make sure you take account when offseting the player’s orientation, you want to offset right when the player presses D and is facing forward but you technically need to offset to the left when the player is looking back!

  3. Not entirely sure but I think you could maybe use Humanoid.MoveDirection to get the direction the player is walking, you’re going to have to see if that property works properly while the player is attached to a constraint though.

1 Like

You can do this with anything that applies a force that you can change.
LineForce, VectorForce, BodyForce, BodyThrust and even :ApplyImpulse()

You should use what you find easiest.

1 Like

Hi, update to my post.

I’m a big fan of Portal and doing the excursion funnels sounded pretty fun so I went ahead and coded it and made it uncopylocked, hopefully there isn’t too many bugs and it definitely isn’t perfect and has no support for parts other than characters, though you can definitely add it, unfortunately I didn’t add proper comments/documentation so that’s definitely a problem and I’m sorry about that.

I would recommend you code it yourself and only read my code to get an idea on what to do, hope this helps!

1 Like

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