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

How do i make the Children of a model go transparent??

Asked by
iuclds 720 Moderation Voter
4 years ago
script.Parent:GetChildren(Transparency == 1)

my script i also tried

script.Parent:GetChildren
Transparency = 1
0
Thats not how u get children lol, neither is the transparency. So you'd loop through the children. B_rnz 171 — 4y
0
Then once you've looped, make all of the children transparency = 1 B_rnz 171 — 4y

2 answers

Log in to vote
0
Answered by
imKlevi 94
4 years ago

script.Parent:GetChildren(Transparency == 1) is a wrong script also ur new script is so wrong too. Try this script, if didn't worked reply here!

local childrens = script.Parent:GetChildren() -- gets childrens of models
for i = 1, #childrens do -- for every child do
local child = childrens[i] -- get the child
    print(child.Name .. " is child number " .. i) -- number of childrens (if you want delete this line)
        child.Transparency = 1 -- sets child's transparency to 1 
end
Ad
Log in to vote
0
Answered by
iuclds 720 Moderation Voter
4 years ago
while true do
    math.random(1,2)
local childrens = script.Parent:GetChildren() -- gets childrens of models
for i = 1, #childrens do -- for every child do
local child = childrens[i] -- get the child
child.Transparency = 0.1 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.2 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.3 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.4 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.5 -- sets child's transparency to 1
wait(0.02)
child.Transparency = 0.6 -- sets child's transparency to 1
wait(0.02) 
child.Transparency = 0.7 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.8 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.9 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 1 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.9 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.8 -- sets child's transparency to 1
wait(0.02)
child.Transparency = 0.7 -- sets child's transparency to 1
wait(0.02)  
child.Transparency = 0.6 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.5 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.4 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.3 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0.2 -- sets child's transparency to 1
wait(0.02) 
child.Transparency = 0.1 -- sets child's transparency to 1 
wait(0.02)
child.Transparency = 0 -- sets child's transparency to 1 
end
end

tried to fade it lol

0
xD nice imKlevi 94 — 4y
0
What is this script!? You could easily just make for i = 1, #childrens do child.Transparency = child.Transparency + 0.1 wait(0.02)end --Fade in for i = 1, #childrens do child.Transparency = child.Transparency-0.1  wait(0.02)end--Fade out    instead of this long lame script mixgingengerina10 223 — 4y

Answer this question