Help with Math and Force

I’m currently working on making the mechanics for a skiing game and I thought the best way to do this is by attaching a sphere to the character and moving the sphere with force. I noticed that x_o made a game with the same concept and so I wanted to get some inspiration before making my own. While reading the script I found some math I didn’t understand and so I want to ask for some help. If anyone is ready to explain to me, I would really appreciate it! (hopefully this is the right category)

now here is the script the problem is inside:

RunService:BindToRenderStep("Control", Enum.RenderPriority.Character.Value+1, function(deltaTime)
	-- grounded check
	local floorRay				=, -floor.Unit * FLOOR_CHECK)
	local hit, position, normal	= Workspace:FindPartOnRayWithIgnoreList(floorRay, {CHARACTER})
	local floorDistance			= (position - CHARACTER.Position).Magnitude

	if floorDistance <= HEIGHT then
		grounded	= true
		grounded	= false

	if hit then
		if grounded then
			floor	= normal
			floor	= floor:Lerp(normal, math.min(deltaTime * 5, 1))
		floor	= floor:Lerp(, 1, 0), math.min(deltaTime, 1))

	-- floor cframe
	local lookVector	= CAMERA.CFrame.lookVector
	lookVector			=, 0, lookVector.Z).Unit
	local floorCFrame	=, lookVector)
	local localFloor	= floorCFrame:vectorToObjectSpace(floor)

	local x, y	= math.atan2(-localFloor.X, localFloor.Y), math.atan2(localFloor.Z, localFloor.Y)
	local cfA	= CFrame.Angles(y, 0, 0) * CFrame.Angles(0, 0, x)
	local cfB	= CFrame.Angles(0, 0, x) * CFrame.Angles(y, 0, 0)

	floorCFrame	= floorCFrame * cfA:Lerp(cfB, 0.5)

	-- input
	if not UserInputService:GetFocusedTextBox() then
		local input	=

		if UserInputService:IsKeyDown(Enum.KeyCode.W) then
			input	= input +, 0, -1)
		if UserInputService:IsKeyDown(Enum.KeyCode.S) then
			input	= input +, 0, 1)
		if UserInputService:IsKeyDown(Enum.KeyCode.A) then
			input	= input +, 0, 0)
		if UserInputService:IsKeyDown(Enum.KeyCode.D) then
			input	= input +, 0, 0)

		if input.Magnitude > 0 then
			input	= input.Unit
		targetVelocity	= floorCFrame:VectorToWorldSpace(input * SPEED)

	-- apply force
	if grounded then
		FORCE.Force	= (targetVelocity - CHARACTER.Velocity) * MASS * ACCELERATION
		FORCE.Force	=

This is a lot of code but the part I’m intrested in is where the force is applied towards the bottom of the script. What is the thought process here? Why is he using these values?

I notice the formula looks similar to physics such as v = u + at and it is solving for acceleration a. V and u are target velocity and character velocity respectively, mass is a conversion unit to convert from acceleration into force, and Acceleration is the time taken to accelerate to the final stable value, divide or multiply shouldnt matter too much since it is a constant.

This is done similar to luanoids which I have used for hipheight balancing off the ground.

-- counter gravity and then solve constant acceleration eq
			-- (x1 = x0 + v*t + 0.5*a*t*t) for a to aproach target height over time
			local t = POP_TIME
			aUp = Workspace.Gravity + 2*((targetHeight - currentHeight) - currentVelocity.Y*t)/(t*t)