local Object = workspace.TycoonKitV2.Purchase:WaitForChild(script.Parent.Parent.Parent.Parent:GetAttribute("Object"))
script.Parent.Text = script.Parent.Parent.Parent.Parent:GetAttribute("Object").." "..script.Parent.Parent.Parent.Parent:GetAttribute("Cost").."€"
script.Parent.Font = script.Parent.Parent.Parent.Parent.Parent.Parent:GetAttribute("Font")
for index, descendant in pairs(workspace.TycoonKitV2.Purchase:WaitForChild(script.Parent.Parent.Parent.Parent:GetAttribute("Object")):GetDescendants()) do
print(descendant.Name)
end
for index, descendant in pairs(workspace.TycoonKitV2.Purchase:WaitForChild(script.Parent.Parent.Parent.Parent:GetAttribute("Object")):GetDescendants()) do
print(descendant.Name)
if descendant:IsA("BasePart") then
print("Base")
local Transy = descendant.Transparency
descendant.Transparency = 1
while true do
if Object.Parent == workspace.TycoonKitV2.Purchased then
descendant.Transparency = Transy
end
wait(0.1)
end
elseif descendant:IsA("TextLabel") then
local Transy = descendant.Transparency
descendant.Transparency = 1
while true do
if Object.Parent == workspace.TycoonKitV2.Purchased then
descendant.Transparency = Transy
end
wait(0.1)
end
elseif descendant:IsA("Part") then
local Transy = descendant.Transparency
descendant.Transparency = 1
while true do
if Object.Parent == workspace.TycoonKitV2.Purchased then
descendant.Transparency = Transy
end
wait(0.1)
end
end
end
COMMUNITY QUESTION
Hi, Im Making A Tycoon Kit But I Have Problem with in pairs.So i need from you some help pwease???
1 answer
The Main Problem is the 4Line is printing everything 7Line is printing only One Part :/
2 comments
0
Theres a while loop inside the for loop that will never stop. "While true" runs forever unless its stopped with "break", so maybe replace the "true" with the objects transparency or switch the full while loop to a repeat loop
0
Please post itas Answear
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
What exactly do you need help with