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

Why isn't this working?

wait()

function onTouched(hit)

 wait()

script.Parent.Anchored = false

script.Parent.Sparkles:Destroy()

script:Destroy()

end

script.Parent.Touched:connect(onTouched)

Nothing appears in the output. It is unanchored upon touch, but still has sparkles.

1 answer

wait()
function onTouched(hit)
wait()
script.Parent.Anchored = false
script.Parent.Sparkles:remove()
script:Destroy()
end
script.Parent.Touched:connect(onTouched)

Everything with this looks alright. I prefer to use the ':remove()' command, but this still should be fine. Try it like this and make sure that you're leading the 5th line to the sparkles correctly.

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