Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Checkpoint Effects (like confetti or something) particle emmiter?

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

1 comment

0

you should use script.Parent.Touched:Connect(function()

1 answer

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)

3 comments

0

You can change the properties of conf to whatever you want

0

OOOOh thank you

0

Nice script, although you can just enable/disable it, its my own opinion and its better to understand.

This discussion is preserved as it was. New answers, comments, and votes are closed.