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)
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”
You also have to tweak the particle emitter called PoofSmoke if you want it to actually look okay.
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)
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
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