How do I make dust particles on the player feet when running?

I been searching for a script that matches the style of Kanju Paradise function when player sprints with shift it makes the dust particles.

  1. What do you want to achieve? Code examples and where I have to put the code for R6

  2. What is the issue? making a dust sprint effect just when player is running for R6

  3. What solutions have you tried so far? I tried searching on YouTube and The Devforum but all of the code examples was for R15,
    And didn’t work for me.

1 Like

Check if the humanoid state is running and if so add the particles to the players feet.

put in character starter scripts, localscript.

also put a particle named “Particle” in both left leg and right leg of your character with the dust particle

local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer



plr.Character.Humanoid.Running:Connect(function(speed)
	
	if speed > 0 then
		plr.Character.LeftLeg.Particle.Enabled=true
		plr.Character.RightLeg.Particle.Enabled=true
	else
		plr.Character.LeftLeg.Particle.Enabled=false
		plr.Character.RightLeg.Particle.Enabled=false
		
	end
	
	
	
end)

SERVER SCRIPT

local Players = game:GetService("Players")
local Rep = game:GetService("ReplicatedStorage")

local SmokeImage = "rbxassetid://301956793"

Players.PlayerAdded:Connect(function(Plr)
	Plr.CharacterAdded:Connect(function(Char)
		if Char then
			local HumanoidRootPart = Char:WaitForChild("HumanoidRootPart")
			if HumanoidRootPart then
				
				local FxCloudpart = Instance.new("Part")
				FxCloudpart.CanCollide = false
				FxCloudpart.CanTouch = false
				FxCloudpart.CanQuery = false
				FxCloudpart.Transparency = 0.1
				FxCloudpart.Size = Vector3.new(0.1,0.1,0.1)
				FxCloudpart.Parent = HumanoidRootPart
				FxCloudpart.Massless = true
				FxCloudpart.Material = Enum.Material.Neon
				FxCloudpart.Name = "SprintFxs"
				
				local Weld = Instance.new("Weld",FxCloudpart)
				Weld.Part0 = FxCloudpart Weld.Part1 = HumanoidRootPart
				
				Weld.C0 = CFrame.new(0,2.5,0)
				
				local PoofSmoke = Instance.new("ParticleEmitter",FxCloudpart)
				PoofSmoke.Enabled = false
				PoofSmoke.Texture = SmokeImage
				----CHANGE THE INSTANCE POOFSMOKE HERE
				
				
				-----

				
			end
		end
	end)
end)

Rep.On.OnServerEvent:Connect(function(plr, Particle)
	Particle.Enabled = true
end)

Rep.Off.OnServerEvent:Connect(function(plr, Particle)
	Particle.Enabled = false
end)

LOCAL SCRIPT

local Char = script.Parent
local Humanoid = Char:WaitForChild("Humanoid")
local HRoot = Char:WaitForChild("HumanoidRootPart")
local PuffCloud = HRoot:WaitForChild("SprintFxs")

---
local UserInputService = game:GetService("UserInputService")
local Rep = game:GetService("ReplicatedStorage")

local SprintBoolen = false
local InputSprintButton = Enum.KeyCode.Q

UserInputService.InputBegan:Connect(function(Input,GPE)
	if Input.KeyCode == InputSprintButton then
		SprintBoolen = true
		
		UserInputService.InputEnded:Connect(function(Input,GPE)
			if Input.KeyCode == InputSprintButton then
				SprintBoolen = false
			end
		end)
	end
end)


while wait() do
	if SprintBoolen == true and Humanoid.MoveDirection.Magnitude > 0 then
		Rep.On:FireServer(PuffCloud:FindFirstChild("ParticleEmitter"))
		print("ON")
	else
		print("OFF")
		Rep.Off:FireServer(PuffCloud:FindFirstChild("ParticleEmitter"))
	end
end

Also put in a remote event called “On” and “Off”
image

You also have to tweak the particle emitter called PoofSmoke if you want it to actually look okay.

or just use my localscript, as a script in StarterCharacterScripts, xDDD save performace on overload of remoteevents

I mean sure, but yours is only locally seen

so hard to make it server

local plrs = game:GetService("Players")

plrs.PlayerAdded:Connect(function(player)
	
	player.CharacterAdded:Connect(function(char)
		
		char.Humanoid.Running:Connect(function(speed)

			if speed > 0 then
				char.LeftLeg.Particle.Enabled=true
				char.RightLeg.Particle.Enabled=true
			else
				char.LeftLeg.Particle.Enabled=false
				char.RightLeg.Particle.Enabled=false

			end



		end)
		
	end)
	
end)





I have all that code in user-input, because he said only when a player presses SHIFT, I’m not stupid. Its coded like that for a reason

Also if your talking about the while wait() do loop over filling the server with remote event fired. You can just make the script check if the trail is on or not.

dude i think u a bit stupid but you do you, with you heavy server script that will lag ur game
XDDD

local plrs = game:GetService("Players")
local runSpeed = 20
local walkSpeed= 16

plrs.PlayerAdded:Connect(function(player)
	
	player.CharacterAdded:Connect(function(char)
		
		char.Humanoid.Running:Connect(function(speed)

			if speed > walkSpeed then
				char.LeftLeg.Particle.Enabled=true
				char.RightLeg.Particle.Enabled=true
			else if speed < runSpeed then
					char.LeftLeg.Particle.Enabled=false
					char.RightLeg.Particle.Enabled=false
				end
				

			end



		end)
		
	end)
	
end)





This will make particle only show when player is running above walking speed therefore he has to be pressing shift

Explain what’s so heavy about the script?

Remote events, and lots of lines in server script

Well, remote events, yes they’re heavy I guess. but all those lines don’t really matter because there just making a part to put under the players’ feet.

Yes but if there is no need for remote events, they stack up and when you need to use it in your game its gonna have a worse performance because you using it for things that are not neccesary

Okay, well you could have just said that instead of kinda calling me flat-out stupid.

Because you thought I didn’t think about the shift thing XD, and avoided writing a bunch of local script with 3 lines of code. But, nether the less, you can just use a bindable event its between server to server if you really want to that like using a module basically lol

What does Roblox even qualify as running? aka what is the speed that it hits before it says the player is running or walking

Because if i were to know, i wouldn’t have made the script

Umm default walkspeed is 16 is that what you mean?? and there is not feature like that you have to set the values for running and walking