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

How to make a brick that will dissapear after 2 seconds AUTOMATICALLY?

Well how would I make a script like that?

Is it editing this?

function onTouched() wait(2.0) script.Parent.Transparency = 1 script.Parent.CanCollide = false wait(5) script.Parent.Transparency = 0 script.Parent.CanCollide = true end

script.Parent.Touched:connect(onTouched)

I don't know,please help! I'm a Noob at Scripting!Don't hate!

(EDIT:)Just saying that I don't want it to Reappear!

1 comment

0

Try saying "local function onTouched()"

2 answers

✓ Accepted answer

you can either make it invisible and impossible to collide with or you can simply delete it.

--Disappear
function onTouched()
script.Parent.Cancollide = false
script.Parent.Transparency = 1
end
script.Parent.Touched:connect(onTouched)
--Destroy
function onTouched()
script.Parent:Destroy()
end
script.Parent.Touched:connect(onTouched)

1 comment

0

That works!I putted it with the script that @Aimarekin gived me!

Write a script inside the block:

wait (2.0)
script.Parent.Destroy ()

This will AUTOMATICALLY delete it just after TWO SECONDS, so if you want to be deleted 2 seconds after something, you'll need to edit the script and get it into an event.

1 comment

0

That works!I putted it with the script that @GalaxyFPS_Studios gived me!

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