Dashing system help

so im making a dash system for a battlegrounds game and the dashing is not good. you can’t turn mid dash and you float if you dash mid air. im using body velocity. if anyone knows how to fix this let me know, ive tried to make it update velocity constantly but that doesn’t work for me.

I did help someone 3 years ago with a dash system, but it’s based on Tweenservice, so it’s very choppy. Using LinearVelocity might be good, basing the VectorVelocity on the direction the player faces (humanoidRootPart.CFrame.LookVector.Unit * speedValue?). And, doing whatever on the client instead of the server probably makes things smoother.

@1kaelen1 worked on a dash recently though for our team in a game jam. Maybe they could jump in here.

If it helps, there are a lot of examples on the forum already. I recommend using the advanced search feature: https://devforum.roblox.com/search?q=dash%20in%3Atitle%20order%3Alatest_topic

1 Like

I think you just have to set the Velocity of the BodyVelocity every frame to do this. Not sure if there’s a better solution.

Lower your MaxForce.Y (or set it to 0) to fix this.

2 Likes

LinearVelocity.

this turned into a token that reads “Line”. The attachment itself can point towards the front of the look vector anyways so there is no need for a script to change it, making the game run faster.

i said already i tried setting the velocity every frame.

use LinearVelocity and do @SubtotalAnt8185’s solution (he seems smarter than me)

1 Like

i still can’t figure it out, i looked at something for linearvelocity and tried it and it didn’t work. please help this is my code

local plr = plr
	
	if Argument == "W" then
		local anim = plr.Character.Humanoid:LoadAnimation(script.WDashAnimation)
		anim:Play()
		
		local Part = Instance.new("Part", workspace) -- the part to move
		Part.Transparency = 1
		Part.CanCollide = false
		spawn(function()
			local cont = true
			spawn(function()
				wait(0.5)
				cont = false
				Part:Destroy()
			end)
			while cont == true do
				wait(0)
				Part.CFrame = plr.Character.HumanoidRootPart.CFrame * Vector3.new(0,0,-3)
			end
		end)
		
		local Attachment = Instance.new("Attachment", Part)
		
		local BV = Instance.new("LinearVelocity", Attachment)
		BV.MaxForce = math.huge
		BV.Attachment0 = Attachment
		BV.VectorVelocity = plr.Character.HumanoidRootPart.CFrame.lookVector * 80
		game:GetService("Debris"):AddItem(BV,0.5)
	end

this is all in the server btw. idk if that affects it.

basically im not going to code for you but ill tell you.
use body or linear velocity but for me linear since bv deprecated have alot of issues.
for making dash camerarelative use :

UserSettings().GameSettings.RotationType = Enum.RotationType.CameraRelative

or
Right Vector.

for front dash make it sent to server then to client make vel and hitbox when hit someone stop vel and send hitted someone and play a hit hitbox for damage etc, on server. or just move the hit u got from client to server.

use magnitude for knockback if close etc,

recap :
server call client
client do vel thingy and checks
if client hit someone
send to server
server check magnitude
server hit

I fixed it myself, i moved the velocity to client and repeated it and it works

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.