Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Particle emitters, but only on the client side?

Asked by 6 years ago

How do I pull this off? I just want only one player to see the particles

2 answers

Log in to vote
2
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

Filtering Enabled:

Simply set create/enable the particle emitter from a LocalScript. LocalScripts should be located somewhere individual to each player, such as their gui or backpack, so somewhere like StarterGui or StarterPack should work.

If you want it to happen after something in a server script has occurred, use a remote event. E.g in a LocalScript:

game.ReplicatedStorage.EnableParticle.OnClientEvent:Connect(function(Enabled)
    workspace.ParticlePart.ParticleEmitter.Enabled = Enabled
end)

In a server script:

game.ReplicatedStorage.EnableParticle:FireClient(Player,true) --to enable particle
game.ReplicatedStorage.EnableParticle:FireClient(Player,false) --to disable particle

if you have a RemoteEvent in ReplicatedStorage called EnableParticle.

Filtering Disabled:

Create the part inside the player's camera with a LocalScript, and use a LocalScript to put the emitter in that. This isn't recommended.

Hope this helps!

Ad
Log in to vote
0
Answered by 6 years ago

Nothing much, if you want only the client to see something there are two methods:

1) FilteringEnabled

FilteringEnabled makes things that appear/happen in the client not replicate to the server, so you just use a localscript to create the particle emitter and you're set.

2) Taking advantage of Player's camera

Simple method, anything that is put into the player's camera only appears to them, you can use this even when Filtering is disabled.

Answer this question