How to remove friction from vectorforce

when my vectorforce is pushing someone and they are standing on a part it gives them friction, but not when jumping, which proves it is friction, how to remove it

You can’t remove the Friction of the Part they are standing on without it affecting normal movement, but how about decreasing the VectorForce while the HumanoidStateType is FallingDown, Flying, FreeFall, Ragdoll, or Jumping.
Not sure, but you may also be able to use Humanoid.FloorMaterial to check what’s under the Humanoid.

2 Likes

so you can’t remove the friction of the vectorforce itself?

Why would you?
It’s a Force, so it (hopefully) only reacts as it would in real life. If you push someone IRL there will be friction on the ground and almost none in the air.
You have to change the amount of VectorForce if you want them to move the same amount whether they are in the air or on the ground.

but we can remove the friction from the part using custom physical \

but as scott said, it would affect normal movement

since i have no need for the force to interact with friction, or any other objects other than the player. i just want something that can move the player smoothly a few studs forward

But a VectorForce is just a force. If there is friction then the friction will counteract the force. You could make the VectorForce Y value slightly positive to get the player off the ground a tiny little bit.

Please give us an idea of what you are trying to do with this. Is it a pushback from another player, is it a flying script, is it a dash type move or attack? More information from you will help us out.

1 Like

I don’t know much but isn’t there a CustomPhysicalProperties?
https://developer.roblox.com/en-us/api-reference/property/BasePart/CustomPhysicalProperties

it is a dash type move, so basically when the player presses q, I want it to play the animation (works) and then move them forward while the animation plays (tried with vectorforce)

You can counteract the friction by adding the product of the normal force and friction value and adding that to the current force. However, you may need to change the force depending on the humanoid states like if they are in the air.

totalmass =???
friction = ???
force = totalmass*game.Workspace.Gravity*friction
2 Likes

This is not friction, this is the Humanoid controller overriding physics to make keyboard-controlled movement easier.

You likely won’t overcome it with a force, and if you do the result will be buggy and unpredictable, unless you change the humanoid state to Physics or something.

I would suggest using a different method to move the humanoid, maybe setting the CFrame directly or using AlignPosition or something. I’m not sure the best option but a force is probably not it.

1 Like

pls elaborate for align position, align position needs two attachment, so what would the second attachment be on?

Hi! I found this problem too, but I found some kind of solution, It always creates a force upwards, but isn’t visually noticable.

I then noticed that depending on the mass of the part, It went slower the higher it was.

Use the vectorToForce() function and pass first off the force instance, and then a vector3. It will do some maths and return another vector3 but customized.

You can try changing the antifriction and default variables if you want 1 to be faster or slower, same with the antifriction.
Code:

antifriction = 174
default = 14

function vectorToForce(force, vector)
	part = force.Attachment0.Parent
	mass = part.AssemblyMass
	result = Vector3.new((vector.X * default) * mass, (vector.Y + antifriction) * mass, (vector.Z * default) * mass)
	return result	
end

vectorForce.Force = vectorToForce(vectorForce, Vector3.new(1,0,0)) -- This will slightly move the part on the X axis

Let me know if this was helpful!

7 Likes

hm, ill have to try to integrate that into my movement script I guess!
i don’t even remember if I fixed it or not, but this seems the way to go!

2 Likes