What do you want to achieve?
I’m trying to achieve something like the Kick the Buddy (a fun childhood mobile game) and create a similar grab system when you can grab specific part of a humanoid character and drag around the map or even throw it.
What is the issue?
I’ve already made the attachment and the IKControl configuration, but I didn’t found a way to when the target is too far away the humanoid start to be dragged into the direction of the target. (and of course seems holding it, so maybe glue the hand to target)
(At the end of the video I’m walking manually to target direction, I want to make something similar, but maybe applying a ragdoll when target move too far away from the player)
(So I also need a good ragdoll system, if you have some suggestion)
What solutions have you tried so far?
I’ve tried AlignPosition from Hand to Target but this almost made a black hole. LOL.
There is no secret to achieve what I’ve made so far (No script yet, I was manually making the concept before scripting it)
1 - Enable “IKControlConstraintSupport” in Workspace
2 - Create a Target Part and join the test mode
3 - Add a IKControl into your HumanoidRootPart, configure it with Type: Position , EndEffector: LeftHand or RightHand, Target: TargetPart, ChainRoot: UpperTorso
Perhaps using the Humanoid:MoveTo() and Humanoid.MoveToPoint are able to be used in this scenario.
Looking at the distance you move the target is about 2 studs until it’s out of reach, you should be able to do some math to determine what the proper maximum WalkSpeed value would be. The closer you hold the target, the slower your character would walk to the target. You can also set a minimum value of about 1 stud, that if the target is not too far out of reach, the character will stand still and let it’s arm get tugged. If the target exceeds past the point of reach (2 studs), you enable the ragdoll to simulate the character ‘tripping’.
I currently am not able to do the math, but a rough to show what I mean;
Excuse any errors, I am not using Studio to type the script.
local minReach = 1 --//Minimum distance to start the humanoid walking
local maxReach = 2 --//Maximum distance until the character will ragdoll
while task.wait(0.1) do
local distance = (character.HumanoidRootPart.Position - target.Position).Magnitude --//Obtain the distance
if distance >= minReach and distance <= maxReach then --//Like said before, check if the target is within minimum reach and maximum reach
local walkSpeed = (distance - minReach) * 20 --//Play around with this sum, but this should total the character's WalkSpeed
character.Humanoid.WalkSpeed = walkSpeed
--//Execute the Humanoid:MoveTo() and Humanoid.MoveToPoint functions here
elseif distance > maxReach then --//If its further then the max distance then..
--//..Enable ragdoll here
end
end