I made a parachute that has an animation when opened. The problem is the parachute lines. I want it so there is bricks along the edge of the parachute and connect wires to them and the player with SelectionPartLasso’s. The problem is that since they are separate from the parachute I can’t size them all in one and that’s the problem I’m having is that I can’t position the bricks with the parachute once the parachute opens.
What it is supposed to look like:
As you can see, the position of the lines match the parachute while it sizes
What it looks like:
The neon green bricks are what the wires are gonna be attached to.
As you can see that the bricks move but not with the parachute.
Code:
repeat
wait(0.02)
ParachuteModel.MainParachute.Size = Vector3.new(ParachuteModel.MainParachute.Size.X + 0.3, ParachuteModel.MainParachute.Size.Y, ParachuteModel.MainParachute.Size.Z + 0.3)
local d = ParachuteModel:GetChildren()
for i=1, #d do
if (d[i].Name == "LineHook") then
d[i].Position = Vector3.new(d[i].Position.X + 0.1, d[i].Position.Y, d[i].Position.Z + 0.1)
end
end
until ParachuteModel.MainParachute.Size.X > 30
I’d like to know how to move the lines with the parachute. Thank you to anyone who helps!
You will need to move it away from the center of the parachute. You can do that by using some funky trigonometry to get its angle from the center then create a cframe, increase the distance and then put it back into position with the angle you got earlier.
Why don’t you use multiple RopeConstraints to connect the chute to the player? I have made a similar system in which I use RopeConstraints to attach the Chute to the Player and it’s been working just fine.
All you have to do is create a few attachments on the character and on the chute then connect each one via a RopeConstraint. Not only can you easily change the length of these constraints but they simulate real physics way better than static parts rigidly welding you to the parachute. They are also way easier to work with, no need for complex linear algebra trying to find the exact CFrame for each connecting part.
I tried using that but the only problem is that when I try to size the parachute for the animation the attachment stays in the same place from the original size.
It shouldn’t be too hard if you just scale the Position property of the Attachment relative to the increase of size of the chute. ex. Increase size of the chute by two studs on the x axis then increase the position of the attachment by one stud on the x axis.
(sorry for the delayed response) I’ve came across a problem. When I change the x and z values of the position of the attachment, it works but it moves the attachment to a place other than the place I wanted.
repeat
wait(0.02)
ParachuteModel.MainParachute.Attachment0.Position = Vector3.new(ParachuteModel.MainParachute.Attachment0.Position.X + 0.2, ParachuteModel.MainParachute.Attachment0.Position.Y, ParachuteModel.MainParachute.Attachment0.Position.Z + 0.2)
ParachuteModel.MainParachute.Attachment1.Position = Vector3.new(ParachuteModel.MainParachute.Attachment0.Position.X + 0.2, ParachuteModel.MainParachute.Attachment0.Position.Y, ParachuteModel.MainParachute.Attachment0.Position.Z + 0.2)
ParachuteModel.MainParachute.Size = Vector3.new(ParachuteModel.MainParachute.Size.X + 0.3, ParachuteModel.MainParachute.Size.Y, ParachuteModel.MainParachute.Size.Z + 0.3)
local d = ParachuteModel:GetChildren() -- this is not part of the code anymore since I just deleted the linehooks for the constraint test
for i=1, #d do
if (d[i].Name == "LineHook") then
d[i].Position = Vector3.new(d[i].Position.X + 0.3, d[i].Position.Y, d[i].Position.Z + 0.3)
end
end
until ParachuteModel.MainParachute.Size.X > 30
For the attachments try increasing them by half the rate you are increasing the size of the chute. If the chute expands 2 studs on an axis, it’s only actually expanding a single stud on each side.