How to apply force/velocity only on one of two welded parts?

I have a basketball tool, for the dribble or bounce, I currently just change the tool grippos but that’s not smooth. What are other ways to move the tool handle alone?

I wanna use LinearVelocity, but the problem is that the player moves with the ball because of RightGrip. How do i make only the basketball tool move when using linear velocity or does it not work?

I’ve disabled the RightGrip weld but that just makes the ball on it’s own. I want the ball to be welded and put linear velocity only on the ball so that only the ball moves.

Here’s a video(with RightGrip disabled):

code i use:

		Tool.GripPos = Vector3.new(0.5, -0.5, -0.3)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, -1, 0)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, -1.5, 0.5)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, -1.5, 1)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, -1.5, 1.5)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, -1, 2)
		wait(0.02)
		Tool.GripPos = Vector3.new(1, -0.5, 2.5)
		wait(0.02)
		Tool.GripPos = Vector3.new(1.5, 0, 3)
		wait(0.02)
		Tool.GripPos = Vector3.new(2, 0.5, 3)
		wait(0.02)
		Tool.GripPos = Vector3.new(2.5, 1, 3)
		wait(0.02)
		Tool.GripPos = Vector3.new(3, 1.5, 3)
		wait(0.02)
		Tool.GripPos = Vector3.new(2.5, 2, 2.5)
		wait(0.02)
		Tool.GripPos = Vector3.new(2, 2.5, 2)
		wait(0.02)
		Tool.GripPos = Vector3.new(1.5, 3, 1.5)
		wait(0.02)
		Tool.GripPos = Vector3.new(1, 3.5, 1)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, 3, 0.5)
		wait(0.02)
		Tool.GripPos = Vector3.new(0.5, 2.5, 0)
		wait()

a weld sticks two parts together in the same offset

thats like its only purpose

you cant just keep the weld and not keep its function

What I want is to keep two objects attached to each other or they move together but you can apply a mover constraint to either one of them, lets say theres a player with a basketball, I want the basketball to stay attached to the player so when I move the basketball moves with the player but I can also use linear velocity on it so it moves and gets linear velocity on it at the same time.

Instead of RightGrip, create a Motor6D weld that lets the ball visually stay in the hand but move independently with physics.

local tool = script.Parent
local ball = tool.Handle
local character = tool.Parent
local humanoid = character:FindFirstChildOfClass("Humanoid")
local hand = character:FindFirstChild("RightHand") or character:FindFirstChild("Right Arm")  -- # R15/R6 Support

local grip = character:FindFirstChild("RightGrip")
if grip then grip:Destroy() end

local motor = Instance.new("Motor6D")
motor.Part0 = hand
motor.Part1 = ball
motor.C0 = CFrame.new(0, -1, 0) -- # Adjust position as needed
motor.Parent = hand

-- # Adjust this to your liking
local linearVelocity = Instance.new("LinearVelocity")
linearVelocity.Attachment0 = ball:FindFirstChildWhichIsA("Attachment") or Instance.new("Attachment", ball)
linearVelocity.MaxForce = math.huge
linearVelocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
linearVelocity.VectorVelocity = Vector3.new(0, -30, 0) 
linearVelocity.Parent = ball

you can apply physics to an object affected with a motor 6d?

never knew that

Yes, you can use physics with parts connected by a Motor6D. It lets parts move or rotate, and they can still be pushed or spun by forces, i.e gravity

wait then how come your player character doesnt immediately get all its limbs flying off

The Motor6D keeps the ball attached to the hand, so it doesn’t fly off. The LinearVelocity makes the ball move down, but the motor still controls its position, keeping it in place with the hand, the player’s limbs don’t fly off because they’re controlled by the Humanoid and connected with special joints, not just motors. These joints and constraints keep everything in place, so the limbs stay attached even though they can move.

so it locks your X and Z to the hand but not your Y? how do you control that?

The Motor6D lets the ball move along the Y axis (up and down) by default. To stop it from moving up or down, you can set motor.C0 = CFrame.new(0, 0, 0), which locks the ball’s position completely to the hand.

1 Like

This didn’t work, the character still gets the linear velocity too:


.

Can anyone help me? sorry for the bump

i think it would just be easier to make an animation at this point

1 Like