Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why doesnt its transparency change?

elseif mode == 2 then --Reality local soundeffect = game.ReplicatedStorage.LandSummon:Clone() soundeffect.Parent = character.UpperTorso soundeffect:Play() local summon = game.ReplicatedStorage:FindFirstChild("Dark Land"):Clone() local summonchildren = summon:GetChildren() summonchildren.Transparency = 1 summon.PrimaryPart = summon.Center summon.Parent = character.RightFoot summon:SetPrimaryPartCFrame(summon:GetPrimaryPartCFrame() * CFrame.new(character.RightFoot.Position))

for i = 1,10 do wait(0.05) summonchildren.Transparency = summonchildren.Transparency - 0.1 end

game:GetService("Debris"):AddItem(summon,30

its transparency wont change. 'Dark Land' is a model.

2 comments

1

You didn't put the whole code into the code block lol

1

only one line of code?

1 answer

You’re trying to set the transparency of a table. :P

:GetChildren() returns a table, so you’ll have to use a for loop to actually get all the parts.

Here’s an example of how to use it :

local model = script.Parent -- Script is in model

for i,v in pairs(model:GetChildren()) do -- “i” is the number of items in model. “v” are the items thenselves
    if v:IsA('BasePart') then -- Checks if object is a part
        v.Transparency = 1
    end
end

Hoped this helped!

Also please put your code in a code block next time.

1 comment

0

lol

This discussion is preserved as it was. New answers, comments, and votes are closed.