1. BrickPlanet Forum
  2. Game & Scripting Discussion
  3. Help me
Help me
bps2
UGC
Level 13
Joined Feb 1st 2025
Posts 2,019
Posted Aug 21st 2025 at 3:05PM

for _, child in pairs(script.Parent:GetChildren()) do while wait(0.1) do child.Opacity = child.Opacity -1 if child.Opacity == 0 then script.Parent:Destroy() end end end

what's wrong with this script? It gives me an error, it also says: try contacting an administrator if the problem persists

impatience
Level 3
Joined Aug 18th 2025
Posts 3
Posted Aug 21st 2025 at 3:27PM

maybe add an if child:isA("Part") in there and see if it works

bps2
UGC
Level 13
Joined Feb 1st 2025
Posts 2,019
Posted Aug 21st 2025 at 5:02PM

Mmh right ima try thanks

impatience
Level 3
Joined Aug 18th 2025
Posts 3
Posted Aug 21st 2025 at 5:51PM

did it work?!?!

bps2
UGC
Level 13
Joined Feb 1st 2025
Posts 2,019
Posted Aug 22nd 2025 at 10:51PM

Yeah nothing changed

8833
8833
Level 8
Joined Aug 19th 2025
Posts 50
Posted Aug 22nd 2025 at 11:04PM

ill let you know when i have a fix!

8833
8833
Level 8
Joined Aug 19th 2025
Posts 50
Posted Aug 22nd 2025 at 11:13PM

try this out

local parent = script.Parent local children = parent:GetChildren()

while #children > 0 do wait(0.1) for i = #children, 1, -1 do local c = children[i] if type(c.Opacity) == "number" then c.Opacity = math.max(0, c.Opacity - 1) if c.Opacity == 0 then c:Destroy() table.remove(children, i) end else table.remove(children, i) end end end

print("working :D") parent:Destroy()

Search Forum

Thread Info

Replies
6
Views
7
Created Aug 21st 2025
Last Reply Aug 22nd 2025