Just to begin with, I'd just like to say that this is my first actual answer that involves proper scripting, so please bear with me if I screw up a little. I'm also not the best scripter in town, and if anyone wants to edit what I've made or let me know of anything I can change, please let me know. :) Also, it's a slightly long post. I went a bit overboard when typing it when I started.
Ok, so having played around with Ghostbeater12's script, I have rewritten it a bit, added comments on every line that I could explain for, and tested it. It should work.
Db = false
function vanish()
if not Db then
Db = true
script.Parent.Transparency = 0
repeat
wait(1)
script.Parent.Transparency = script.Parent.Transparency + 0.2
until script.Parent.Transparency == 1
script.Parent.CanCollide = false
wait(3)
script.Parent.CanCollide = true
repeat
wait(1)
script.Parent.Transparency = script.Parent.Transparency - 0.2
until script.Parent.Transparency <= 0
Db = false
end
end
script.Parent.Touched:connect(vanish)
(Pardon the jokes. :P) Uh, yeah, please let me know how this works, and if I have made a sufficient answer. Also, to make this script work, you must put the following code in a script which is inside the brick you want to disappear. For example, say the brick was in workspace, it'd go like this: game<Workspace<The vanishing brick<Script, if you need any more help with this part, let me know. :)
I also actually learnt what repeat loops are and how to use them too. Hah!
Apart from that, hope I helped!
1 comment
This doesn't work ghostbeater12.