How to make this type of speed/wind lines based on player velocity

In parkour reborn, when you get enough speed, these speed lines start appearing on your screen. (you can see it midway through the vid).

I tried recreating this system in my game but it didnt work so well.

local uis = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local players = game:GetService("Players")

local player = players.LocalPlayer
local turn = 0

local Character = script.Parent
local Camera = workspace.CurrentCamera



local particlepart = Instance.new("Part",game.Workspace)
particlepart.Name = "particlePart"
local hrp = Character.Torso
particlepart.Anchored = true
particlepart.CanCollide = false
particlepart.CanTouch = false
particlepart.CanQuery = false
particlepart.Transparency = 1

local particlegenerator = Instance.new("ParticleEmitter",particlepart)
particlegenerator.Texture = "rbxassetid://2597342345"

particlegenerator.EmissionDirection = Enum.NormalId.Front
particlegenerator.Orientation = Enum.ParticleOrientation.VelocityParallel
particlegenerator.Size = NumberSequence.new(2.5)
particlegenerator.SpreadAngle = Vector2.new(40,40)



RunService:BindToRenderStep("CameraSway",Enum.RenderPriority.Camera.Value+1,function(deltaTime)
	if hrp.Velocity.Magnitude >= 50 then
		local rx, ry, rz = Camera.CFrame:ToOrientation()
		particlepart.Rotation = Vector3.new(math.deg(rx), math.deg(ry), math.deg(rz))
		particlepart.Position = Vector3.new(Character.Head.Position.X + hrp.Velocity.Unit.X * 8,Character.Head.Position.Y + hrp.Velocity.Unit.Y * 8,Character.Head.Position.Z + hrp.Velocity.Unit.Z * 8)
		local multiplier = math.clamp((hrp.Velocity.Magnitude - 50)/100,0,1)
		particlegenerator.Transparency = NumberSequence.new(0,1.5/multiplier)
		particlegenerator.Rate = multiplier * 16
	else
		particlegenerator.Transparency = NumberSequence.new(0,1)
	end
end)

How would I make it look more like parkour reborn? thanks

2 Likes

I recently attempted at recreated this exact thing. This might not be the best way to do it, but it looks pretty cool.

You want to make the shape a disk w/ a shape partial of somewhere around 0.3:


This makes it so that the lines fly past the player, instead of being annoying and clipping into the camera.

I just clone it from ReplicatedStorage.

I then just made the part follow the player’s velocity direction, with something like this:

local velocity = root.AssemblyLinearVelocity
local offset = velocity.Unit * 5 -- Move the part in the direction of movement
local targetPosition = root.Position + offset
swivelPart.Position = targetPosition
swivelPart.CFrame = CFrame.lookAt(swivelPart.Position, root.Position) * CFrame.Angles(math.rad(-90), 0, 0) -- Make it face the player (the emission direction is the top for my particles)

This also makes a cool looking effect in third person.
Again, kind of a weird way of doing it, but I like how it looks.

Snippet – Didn’t show the directional changes that well, but they’re there

I also made the rate change based on velocity,