You can write your topic however you want, but you need to answer these questions:
First I want my Character to be able to move given the movement vector I have specified. The issue is the character does not move once they have touched the ground. I have considered using a line vector, which worked fine until I tried to apply gravity and jumping. I currently am using a VectorForce, but have little experience with physics and the new constraints. I was thinking of using body Position but that is deprecated.
local MovementPower = 300
local ThePhysics = Instance.new("Attachment",Root)
local LV = Instance.new("VectorForce",ThePhysics)
LV.Attachment0 = ThePhysics
LV.Visible = true
LV.ApplyAtCenterOfMass = true
LV.RelativeTo = Enum.ActuatorRelativeTo.World
local function Move(Delta)
local Gravity = Gravity(Delta)
if Movement[1] == 0 and Movement[2] == 0 and Movement[3] == 0 and Movement[4] == 0 then
LV.Force = LerpIterations(LV.Force, Vector3.new(0,Gravity,0),Delta)
else
local MovementVector = LerpIterations(LV.Force, RelativeToCamera(RawInput()).Unit * MovementPower * Humanoid.WalkSpeed,Delta)
LV.Force = MovementVector + Vector3.new(0,Gravity,0)
end
end
local function Gravity(Delta) : Number
if Humanoid.FloorMaterial ~= Enum.Material.Air then
if UIS:IsKeyDown(Enum.KeyCode.Space) == true then
return 10000
end
return MyMass
else
return -95
end
end
LerpIteration only lerps x and z for a friction effect.