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)
Here I added a debounce and organized your script a bit.
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.