How to make a firefighter hose

I wanna make a hose like this but how do I do it?;

https://gyazo.com/41de5b84bf8a34584bea0de36d1ec2f6

2 Likes

I feel like one thing you could do is create additional hose segments the further the player walks away from the hose’s origin position (preventing it from exceeding max number of segments), and for each segment you could use a ball socket constraint to attach that with the previous segment.

The two attachments used would have to be near the ends of each hose segment so its rotations appear seamlessly.

Might be a better way, not too sure really.

Yeah I was thinking of having a cylnder of 0.5 long then keep adding more until the max length

Just dont know how to do it thats why
image

You’d start by determining the distance between the player and the fire hydrant, that will be used to create the length for the hose.

You could store each hose segment in a table, with added segments having an index of +1, so e.g: the initial or starting hose segment will be at index 1 in the table.

Assign a length for each segment, and then divide the distance between the player and the fire hydrant by the hose segment length, to determine how many hose segments should be created (this should also update dynamically, also round it so you get a whole number)

You can also update the existing hose segments using this too. Iterate through the table of segments, and if the index of the current iteration is > number of hose segments, remove those other segments and their indices in the table.

When it comes time to actually create the hose segments, grab the last hose segment from the table, apply a CFrame offset which should be half of the hose segment’s length, and attach ball socket constraints to it attaching it to the last hose segment stored in the hose segments table.

And the last hose segment created could be welded to the player’s arm or what-not, and the rest of the hose segments should follow where the player goes. Just make sure all the parts are massless.

Hopefully this gives you a general idea of how I’d attack this.

1 Like

oh god ill give it a try can you add me on discord Rjj259#7454 so if I need help I can talk to you? What is yours