How do i make particles follow the player smoothly?

1. What do you want to achieve? I want to make the particles smoothly follow the player as they walk around like in the game shown below (Sol’s RNG)

External Media

2. What is the issue? With my current setup, as the particle emitters move with the player, the old particles stay in their old spots and it looks bad.

External Media

This is my current setup for moving the particles:

local playerService = game:GetService("Players")
local player = playerService.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local root = character:FindFirstChild("HumanoidRootPart")

local attachment = script.Parent:FindFirstChild("main")

while true do
    task.wait(1/60)
    script.Parent.CFrame = (root.CFrame * CFrame.new(0, 50, 0))
end

Is there a way to fix this?
Thanks in advance.

1 Like

ParticleEmitter.LockedToPart


Just use RunService at that point if you are going to fire this every frame.

RunService.RenderStepped:Connect(function()
    -- fires before rendering stuff
    -- be careful of adding too many things, as it can cause lag
    -- if you dont manage it correctly
    script.Parent.CFrame = (root.CFrame * CFrame.new(0, 50, 0))
end)

1 Like