what i’m trying to accomplish is making the player slowly float upwards, and while my code works
it doesn’t let the player move while in the air so i’m just wondering if there’s any way to do that
local vl = Instance.new("LinearVelocity",char.PrimaryPart)
local at = Instance.new("Attachment",char.PrimaryPart)
vl.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
vl.MaxForce = math.huge
vl.Attachment0 = at
vl.VectorVelocity = Vector3.new(0,10,0)
spawn(function()
task.wait(timer)
vl:Destroy()
end)
Use the settings above on your LinearVelocity, then set the MaxAxesForce to be really high (math.huge probably) on the upwards axis and zero on the other axes.
That causes it to only apply force in the upwards direction, meaning it doesn’t override the character’s movement.