How to make a particle emitter follow player?

This is for a simple desert environment game. Maybe you’ve seen in places that dust will float about the map to add that cool ambient effect? The problem I have is my map is extremely large, so I can’t just blanket the entire desert with one big particle emitter, as that would cause unspeakable lag.
I need to have a part that will latch onto the player when they spawn and be beside them wherever they go. I have no clue where to start and am not an able scripter… help me understand what to do?

1 Like

You can try doing something like PlayerAdded & CharacterAdded on the server:

local Players = game:GetService("Players")
local Particles = script.ParticleEmitter -- replace this with your particleemitter path

Players.PlayerAdded:Connect(function(Player) -- whenever a player is added to the server, the function is called
        Player.CharacterAdded:Connect(function(Character) -- whenever this player has a character added this function is called
                -- get the players humanoidrootpart as a variable for easy use
                local Root = Character:WaitForChild("HumanoidRootPart")
               
                -- clone the particles object and put the clone inside the rootpart
                Particles:Clone().Parent = Root
        end)
end)
2 Likes

I think I need more information than the script itself; is there a proper place to put it?
I’ve rearranged it in many places but nothing is actually making your script happen.

It would be a ServerScript and in ServerScriptService. The particle effect (singular) would need to be inside of the script. Not part, particle effect.

2 Likes

This fixed it, thanks! Still some work to do with the emitter itself, I can handle from here.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.