The part should get destroyed, what is wrong with the script? [Solved]
Asked by
6 years ago Edited 6 years ago
1 | script.Parent.ClickDetector.MouseClick:Connect( function () |
3 | script.Parent.Transparency = script.Parent.Transparency + 0.25 |
5 | if script.Parent.Transparency = = 1 then |
6 | script.Parent:Destroy() |
Everything works except when it comes to "if script.Parent..."
It supposed to destroy the part when the transparency reaches 1.
When the part is transparent it is still there for some reason.
I hope you can understand the script ;)
Thanks