I’m doing a movement system and I’ve come up with a little bit and it had me confused for a while,
every time i dash and jump and like do a little flick, the dash just goes too far away and I’m not sure why its happening, I’m using linear velocity
glitching part
normal one
The Script
local linear = Instance.new("LinearVelocity", char.HumanoidRootPart)
local attachment = Instance.new("Attachment", char.HumanoidRootPart)
attachment.WorldCFrame = char.HumanoidRootPart.CFrame
linear.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
linear.Attachment0 = attachment
linear.MaxForce = math.huge
linear.LineVelocity = 70
if uis:IsKeyDown(Enum.KeyCode.W) then
h:LoadAnimation(Animations.Dashes.Forward):Play()
runService.Stepped:Connect(function()
linear.LineDirection = char.HumanoidRootPart.CFrame.LookVector
end)
elseif uis:IsKeyDown(Enum.KeyCode.D) then
h:LoadAnimation(Animations.Dashes.Right):Play()
runService.Stepped:Connect(function()
linear.LineDirection = char.HumanoidRootPart.CFrame.RightVector
end)
elseif uis:IsKeyDown(Enum.KeyCode.A) then
h:LoadAnimation(Animations.Dashes.Left):Play()
runService.Stepped:Connect(function()
linear.LineDirection = char.HumanoidRootPart.CFrame.RightVector * -1
end)
elseif uis:IsKeyDown(Enum.KeyCode.S) then
h:LoadAnimation(Animations.Dashes.Behind):Play()
runService.Stepped:Connect(function()
linear.LineDirection = char.HumanoidRootPart.CFrame.LookVector * -1
end)
end
game.Debris:AddItem(linear,0.3)
game.Debris:AddItem(attachment,0.3)```
Have you tried using “Body Velocity”? and maybe since the character is doing something like a flick ROBLOX thinks your not on the floor anymore interfering with the hip-height.
Ok, i think the dashing to far you’ve just got to decrease the debris time. I’ve never really encountered problems with dashing, so this is quite new to me.