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

Checkpoint Effects (like confetti or something) particle emmiter? [closed]

Asked by
L30N_C 27
3 years ago
Edited 3 years ago

so i am making this obby and i have created this checkpoints but i want the checkpoints to have like a effect when you're tuching it ( like a particle emmiter (confetti) ) but i only want it to happend once per player. Can Somebody help me with both?

-L30N_C

0
you should use script.Parent.Touched:Connect(function() udakotau 16 — 3y

Closed as Not Constructive by JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 3 years ago

First, I set a variable called touch to see if the player has already touched the part

local touch = false

Next i used .Touched to see if the player touched the Part.

script.Parent.Touched:Connect(function()

Then after that, i saw if touch equaled false

if touch == false then

I created a new instance "ParticleEmitter" and put a wait(3) then destroyed it and also put touch to be equal to true

local conf = Instance.new("ParticleEmitter")
        conf.Parent = script.Parent
        touch = true 
        wait(3)
        script.Parent:FindFirstChild("ParticleEmitter"):Destroy()

So, it should end up like this

local touch = false
script.Parent.Touched:Connect(function()
    if touch == false 
    then 
        local conf = Instance.new("ParticleEmitter")
        conf.Parent = script.Parent
        touch = true 
        wait(3)
        script.Parent:FindFirstChild("ParticleEmitter"):Destroy()
    end
end)
0
You can change the properties of conf to whatever you want udakotau 16 — 3y
0
OOOOh thank you L30N_C 27 — 3y
0
Nice script, although you can just enable/disable it, its my own opinion and its better to understand. Xapelize 2658 — 3y
Ad