I’m currently making my own character controller (which I’m very new at scripting) for my platformer puzzle game which also uses a custom humanoid. I have basic horizontal movement down which uses LineForce for positioning and AlignOrientation for rotation.
I’m working on the jumping for the controller right now and I’ve it came to my attention when testing that whenever the player started jumping, the velocity of the play was decreased. For example if my character’s velocity based on the HumanoidRootPart was 24 on the X axis, after jumping it would’ve decreased back to 3. I’m using VectorForce for jumping as suggested by a friend of mine but it seems to be very choppy and removes the linearity of the movement.
Current Code used for jumping
--Result is a raycast I used in order to find out if player was on the ground --Angle is the angle of the surface the player is currently on to ensure --players can't go over slopes that are fairly steep --PreviousVelocity is just a value that's irrelevant to the situation if BaseLib.UIS:IsKeyDown(Enum.KeyCode.Space) and result and Angle <= 40 then PreviousVelocity = CurrentSpeed CharLib.VectorForce.Force = Vector3.new(CurrentSpeed.X,CharLib.Properties.JumpPower,CurrentSpeed.Z) end CharLib.VectorForce.Force = CharLib.VectorForce.Force:Lerp(Vector3.new(0,0,0), .15)