script.Parent.MouseClick:Connect(function()
local ss = game.ServerStorage
local capsule = ss.Capsule:GetChildren()
wait(1)
script.Parent.Parent:Destroy()
print("DESTROY!!!!!!!!")
end)
how do i change this to add a sparkle effect to the model?
script.Parent.MouseClick:Connect(function()
local ParticleEmitter = script.Parent.Parent.Part.ParticleEmitter -- Make sure to parent the ParticleEmitter to a part inside the model or the model's PrimaryPart. If this is not done, it will not work!
ParticleEmitter.Enabled = true -- The Enabled property of the ParticleEmitter must to false after it is created.
ParticleEmitter:Emit(50) -- Emits 50 particles when clicked. Change 50 to however many particles you want it to emit.
local ServerStorage = game:GetService("ServerStorage")
local Capsule = ServerStorage.Capsule:GetChildren()
task.wait(1)
script.Parent.Parent:Destroy()
print("DESTROYED!!!!")
end)