Achieving Smooth Character Levitation Effect

You can write your topic however you want, but you need to answer these questions:

I am aiming to create a character levitation effect that is incredibly smooth and visually captivating shown in this video: (0:12 - 0:18)

However, I am under of what’s used to achieve this, I attempted to create a linear velocity under the character’s humanoidrootpart, but It didn’t do anything (I may have made an error). I am uncertain whether I should utilize tweening, lerping, or alignpositions.

1 Like

I think VectorForce is what you’re looking for.

Something like this should make the character float:

``````local RootPart = --HumanoidRootPart
local MainForce = Instance.new("VectorForce", RootPart)

local function UpdateFloatForce(MainPart:BasePart, VectorForce:VectorForce, ForceMultiplier:number)
local NewForce = (MainPart.AssemblyMass * workspace.Gravity) * ForceMultiplier

VectorForce.Force = Vector3.yAxis * NewForce
end

UpdateFloatForce(RootPart, MainForce, 1) --1 will make the part have exactly zero gravity

``````

To adjust how much the character floats up, I would suggest tweening `ForceMultiplier`.

Right now it wouldn’t float until the player jumps, am I missing something? I tried to add a linear velocity but it didn’t change.

Try adjusting the number (Currently `1`) in the function to make the character float with more force.
The value I set will just remove gravity, not make the character float up.

Try `UpdateFloatForce(RootPart, MainForce, 5)`

Setting the value to above 1.5 would make the character levitate up too fast, but setting the value to below 1.5 makes the character stick to the ground, is there a way to fix this?

Try switching out the function with this: (Makes the multiplier less sensitive)

``````local function UpdateFloatForce(MainPart:BasePart, VectorForce:VectorForce, ForceMultiplier:number)
local NewForce = (MainPart.AssemblyMass * ForceMultiplier) * workspace.Gravity

VectorForce.Force = Vector3.yAxis * NewForce
end
``````

Also I’m pretty sure the character sticking to the ground is a flaw of how the humanoid stands, you can try enabling the PlatformStand property when the character is floating and see if that helps.

If you still have issues with sticking to the ground (or you don’t want to use PlatformStand) I can try out some possible solutions to this.

The function unfortunately still floats up too fast, and the PlatformStand property ragdolls the character. I tried to tween the force multiplier but then the speed became non-linear.