Still have questions? Join our Discord server and get real time help.
0

# Making particles appear when touching a spawnpoint doesn't work, anyone able to help ?

I made a script to make a particle's clone to weld to the player and move it a bit, then I made another script to make it appear and disappear when I touch a spawnpoint but it doesn't work. Here's the script :

local Checkpoint = script.Parent local Player = game.Workspace.LocalPlayer local Part = Player:WaitForChild("LevelUpParticles") local Particles = Part:WaitForChild("ParticleEmmiter") Checkpoint.Touched:Connect(function() for i = 0,5 do Particles.Rate = Particles.Rate +1 wait(.1) end end)
wait(1) for i = 0,5 do Particles.Rate = Particles.Rate -1 wait(.1) end

It's a local script that I placed directly in the spawnpoint ( I also don't get any errors in the output)

0
Use a debounce. BashCaster 2170 — 2mo

0
Y_VRN 36
2 months ago

local Checkpoint = script.Parent
local Player = game.Workspace.LocalPlayer
local Part = Player:WaitForChild("LevelUpParticles")
local Particles = Part:WaitForChild("ParticleEmmiter")
local Debounce = false

Checkpoint.Touched:Connect(function()
if Debounce == false then
Debounce = true
for i = 0,5 do
Particles.Rate = Particles.Rate +1
wait(.1)
end
wait(1)
for i = 0,5 do
Particles.Rate = Particles.Rate -1
wait(.1)
end
Debounce = false
end
end)


Use the "Tab" key to organize your code. I had a bit of a hard time understanding it.