I want the if part to make the brick remove.
wait(3)
Part = script.Parent
while true do
if Part.Transparency = 0.95 then
Part.Transparency = 1
else
Part.Transparency = 0.3
end
end
I want the if part to make the brick remove.
wait(3)
Part = script.Parent
while true do
if Part.Transparency = 0.95 then
Part.Transparency = 1
else
Part.Transparency = 0.3
end
end
You want to compare the part's transparency to 0.95, not assign it to 0.95. It's important to remember that = is assignment, while == is comparison. This means == will check if two values are exactly the same. This is what you want in your if statement, afterwards, you'd just destroy the part using the Destroy method.
if Part.Transparency == 0.95 then
Part:Destroy()
end
Let me know if you have any questions.
This discussion is preserved as it was. New answers, comments, and votes are closed.