Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Brick dissolving script wont work! (User friendly.) Any codes?

Asked by
Soulzs 0
9 years ago

I need some help. I made a script that dissolves any brick called part (Un-Anchored) Whats wrong with it? ** NOTE THE SCRIPT CANT DISSOLVE PEOPLE ON BRICKS WITH THE NAME "PART"**

If hit.Name == "Part" then 

bin = script.Parent

function onTouched(part)
    part.BrickColor = BrickColor.new(26)
    wait(.3)
    part.Transparency = .2
    wait(.1)
    part.Transparency = .4
    wait(.1)
    part.Transparency = .6
    wait(.1)
    part.Transparency = .8
    wait(.1)
    part.Parent = nil
end

connection = bin.Touched:connect(onTouched)

else return end

2 answers

Log in to vote
0
Answered by
Myuuckn -5
9 years ago
if hit.Name == "Part" then

bin = script.Parent
--If this doesn't work message me back :P
Ad
Log in to vote
0
Answered by 9 years ago

bin = script.Parent function onTouched(part) if part.Name == "Part" then part.BrickColor = BrickColor.new(0,0,0)

for w = 1, 10 do wait(0.1) part.Transparency = part.Transparency + 0.1 end part.Parent = nil else end end

bin.Touched:connect(onTouched)

im noob

Answer this question