So im working on a system where you can throw and pick up people, but throwing someone doesn’t remove the weld from their torso. It works perfectly fine for NPC’s but breaks when used on a player? Any suggestions?
On a npc:
On a player:
I looked in the players torso, the weldConstraint is being kept there. Nothing in output as shown.
I don’t know why you have the WeldThing variable if you are just setting it’s value to an object that already exist. In that case you should just use the original Weld object. Also, You don’t have to create a new WeldConstraint for each character you pick up. You can just set the Part1 property to the new torso part.
In your code it looks like you are setting the parent of the BodyVelocity to the main player. Correct me if I’m wrong, but I’m guessing the mainplayer object is the one who is throwing the player object. If that’s the case then you should be setting it to the player humanoid root part instead.
Its having trouble Finding the weld otherwise, But ill try getting the weld directly. Oh and also the MainPlayer is the picked up player, I name my variables horribly
Normally how I would program something like this is to have an array for each player that has variables in it. Not necessarily object-oriented programming, but still getting somewhat the same thing. Then I would put everything you need to access in that array (or dictionary) so you could access it easily later.