Hey,
Humanoids use a force (as im aware) to “stand” above the surface below them.
In other words, im trying to maintain elevation from the platform below by using a constant force against the direction of gravity.

I have the current Y position and a target Y position (derived from raycast)

How would I calculate this force? This is for a custom character controller.

Use SUVAT equations like luanoids to calculate the acceleration required:

local function calculateForces(targetHeight, currentHeight, currentYVelocity, t, mass, hipHeight, dt)
-- 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 aUp = workspace.Gravity + 2*((targetHeight - currentHeight) - currentYVelocity*t)/(t*t)
return aUp*mass
end

I used exactly that from your physics controller before posting that LOL. but for some reason, it gives an extremely high force.

Im pretty sure im implementing it wrong: I can give Vector3.Y for the heights right? And velocity is assemblylinearvelocity.Y? and t must be time taken I guess. Not good with math and physics.