My particle does not become invisible

I don’t know where to put this topic, so I put it here

  1. What do you want to achieve?
    I want my particle to be invisible by touching a block

  2. What is the issue?

I have no idea how to make it work
mira 2
MIra1

  1. What solutions have you tried so far?
    I tried a script but it doesn’t work, is there another way to make my particle transparent?

I am trying that when touching that red block it disappears with the particle but I don’t know how

1 Like

Set the enabled property of your emitter to false.

2 Likes

Use a function to run the code and make some variables:

local part = script.Parent
local emitter = script.Parent.ParticleEmitter

function touch()

end

Now connect it to a tuched event:

local part = script.Parent
local emitter = script.Parent.ParticleEmitter

function touch()

end

part.Touched:Connect(touch)

Now disable the emitter

local part = script.Parent
local emitter = script.Parent.ParticleEmitter

function touch()
      emitter.Enabled = false
end

part.Touched:Connect(touch)

And finally check if what touched it is a player.

local part = script.Parent
local emitter = script.Parent.ParticleEmitter

function touch(other)
      local hum = other.Parent:FindFirstChild("Humanoid")
      if hum then
         emitter.Enabled = false
      end
end

part.Touched:Connect(touch)
2 Likes