I am working on a gas pump for my game and the way it works is the player clicks F in order to get a “Gas” tool with a ropeconstraint attached to gas pump in order to make a dynamic “hose”. However whenever the tool is equipped it glitches the player to the ground.
Note: I am aware of existing topics but none of them have a valid solution to this problem.
Solutions I tried are as listed:
Delay attaching the Constraint
Set Restitution to 1
Anchoring the Player for a brief moment when equipped
Setting the parent of constraint before setting Attachment1
I was going to suggest anchroing the player for a brief moment while attaching the constraint, but you said you already tried that… What behavior did you see when you tried that fix? Did the player just fall over when you unanchored the character model?
If nothing else works, you could always just create a part which isn’t attached to the character model in anyway however you add a BodyPosition and BodyGyro in it so that it will position itself at the same position and rotation as the character’s arm. This would mitigate any forces exerted on the character model.
Make sure that all Parts in the tool have the Property ‘Massless’ selected so that the physics don’t involve that.
You could also try removing the RopeConstraint to see if that is actually causing the issue or if it’s something else.
You’ve made the Length of the rope 10 studs. What is the length between the Attachments when you equip the tool? What are the Attachments attached to on either end?
If the Length is too short then it definitely will pull the player when the tool is equipped.
I’d suggest having the nozzle with the RopeConstraint mounted on the pump when not equipped, and when it’s equipped just weld it to the players hand so that nothing is being created at the moment that happens.
Or try using a SpringConstraint with no Force in it, and the spring diameter set to zero. I’ve used this setup for crane cables so they don’t have to constantly change length.
Hello, I have had the same problem, but it makes the character unable to animate movement. It does work to move, but the physics gets all wierd, you can see it in the video below: