This remote event inserts particles and trails in attachments / bodyparts of the player when they go above 60 speed, but it should also remove them when they go slower than that again. which it doesnt…
it should also start again after stopping when going below, not perm stop.
local player = game.Players.LocalPlayer
local character = player.Character or script.Parent
local humanoid = character.Humanoid
local remoteevent = game.ReplicatedStorage.RemoteEvent
local RemoteIsActive = false
loc
humanoid.Changed(function(property)
if property == "WalkSpeed" then
if character.Humanoid.MoveDirection.Magnitude == 60 then
RemoteIsActive = true
remoteevent:FireServer()
end
end
end)
humanoid.Changed(function(property)
if property == "WalkSpeed" then
if character.Humanoid.MoveDirection.Magnitude <= 59 then
RemoteIsActive = false
remoteevent:FireServer()
for i,v in pairs(character:GetChildren()) do
if v:IsA("Trail") then
v:Destroy()
end
end
for i,v in pairs(character:GetChildren()) do
if v:IsA("ParticleEmitter") then
v:Destroy()
end
end
end
end
end)
--this remote "stops" the action inside the while loop
remoteevent:Connect(function()
RemoteIsActive = false
end)