Hello! I am trying to make a humanoid figure appear for 1 second, then disappear for 15. And I want this to loop.
However It never appears and I don’t know what to do
Script:
local descendants = script.Parent:GetDescendants()
for _, descendant in pairs(descendants) do
if descendant:IsA("BasePart") then
descendant.Transparency = 1
end
end
script.Parent.MeshPart.Transparency = 1
while true do
wait()
descendants.Transparency = 0
wait(1)
descendants.Transparency = 1
wait(15)
end
Your script isn’t reappearing the humanoid figure as intended because the way you’re setting transparency for descendants isn’t working as expected. Try this instead:
local descendants = script.Parent:GetDescendants()
for _, descendant in pairs(descendants) do
if descendant:IsA("BasePart") then
descendant.Transparency = 1
end
end
if script.Parent.MeshPart:IsA("BasePart") then
script.Parent.MeshPart.Transparency = 1
end
while true do
for _, descendant in pairs(descendants) do
if descendant:IsA("BasePart") then
descendant.Transparency = 0
end
end
wait(1)
for _, descendant in pairs(descendants) do
if descendant:IsA("BasePart") then
descendant.Transparency = 1
end
end
wait(15)
end
This should create the appearance and disappearance loop for your figure/NPC or whatever.
I said that the humanoid root part was appearing and I didn’t know how to stop it from appearing. I just decided to delete it altogether. But tysm for the help!