I made a movement system with LinearVelocity, but this happens:
(I enabled arm collisions for my game)
What I want to achieve:
I made a movement system with LinearVelocity, but this happens:
What I want to achieve:
Can you be more specific about what the problem is? It’s hard to help people when you dont have sufficient info…
All that I see are the arms forcing the player to face upwards because they’re blocking the direction of the velocity.
That is the problem I don’t want to happen. I don’t want the arms to force the player to face upwards.
Try to block the arm on the Y axis
Um, I don’t know what you mean.
Are you applying a constant force of velocity to the character when they walk? I don’t understand the importance of the movement system built on LinearVelocity…
Like the arm has the Y axis at 0, you block it at 0, and this way its not going to go upwards, maybe you will have to block the HumanoidRootPart on the Y axis
Yes. I am using a LinearVelocity to move the character.
This would cause the player model to bug out and move left or right, because the BodyVelocity is still acting on the character model.
How can I prevent that from happening?
Oh, yeah you’re right…
I have tried making the character density to 100, and friction to max.
Instead of using LinearVelocity to move the character, focus on using the already existing movement system paired with whatever elements you want to include.
I’m assuming you want to use the arms as a way to leverage yourself from one place to another. Try different combinations of methods and properties of both the character model and the functions of the arms, however you’re scripting them.
BodyVelocity will probably just distract you from what is already possible through the default movement methods.
I can’t because the Freefall state would ruin it. Freefall makes the character slide off.
(I’m setting LinearVelocity to the MoveDirection)
linearVelocity.LineDirection = humanoid.MoveDirection
What about disabling freefall altogether?
By the way,
Did you make sure to remove the velocity being applied to the character when they are done moving?
I just set LinearVelocity to false when the player stops moving.
if humanoid.FloorMaterial == Enum.Material.Air then
linearVelocity.LineDirection = Vector3.new(humanoid.MoveDirection.X,0,humanoid.MoveDirection.Z)
else
linearVelocity.LineDirection = humanoid.MoveDirection
end
if humanoid.MoveDirection == Vector3.new(0,0,0) then
linearVelocity.LineVelocity = 0
linearVelocity.LineDirection = Vector3.new(0,0,0)
linearVelocity.Enabled = false
else
linearVelocity.LineVelocity = humanoid.WalkSpeed
linearVelocity.Enabled = true
end
(This code is in a loop)
What do you mean by disabling freefall altogether?
Have you tried applying a force to the Y axis as well?
Also, I mean completely disabling freefall like you posted here.