You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want the player to move in root part LookVector position with plane mode linear velocity enabled. I tried this with the vector mode and it works but I don’t want the player to be in the air when the linear velocity is activated. -
What is the issue? Include screenshots / videos if possible!
The character does not move in the direction it is looking at with shift lock enabled.
-- local att0 = Instance.new("Attachment")
att0.Parent = rootpart
att0.WorldPosition = rootpart.AssemblyCenterOfMass
local linear1 = Instance.new("LinearVelocity")
linear1.VelocityConstraintMode = Enum.VelocityConstraintMode.Plane
linear1.Attachment0 = att0
linear1.RelativeTo = Enum.ActuatorRelativeTo.World
linear1.PrimaryTangentAxis = Vector3.new(1,0,0)
linear1.SecondaryTangentAxis = Vector3.new(0,0,1)
linear1.MaxForce = math.huge
local direct = rootpart.CFrame.LookVector
local vector2dash = Vector2.new(direct.X ,direct.Z ) * dashpower
print(vector2dash)
linear1.PlaneVelocity = vector2dash
linear1.Parent = rootpart