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

Why does this script only make head invisible when it should turn invisible all body limbs?

Asked by 6 years ago
Edited 6 years ago
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        local Parts = character:GetChildren()
            for i = 1, #Parts do
            if Parts[i]:IsA("BasePart") then 
                Parts[i].Transparency = 1
            end
        end
    end)
end)
0
Working on a script right now uhTeddy 101 — 6y

3 answers

Log in to vote
0
Answered by
hellmatic 1523 Moderation Voter
6 years ago
game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        local Parts = character:GetChildren()
            for i = 1, #Parts do
            if Parts[i]:IsA("BasePart") then 
                Parts[i].Transparency = 1
            end
        end
    end)
end)
Ad
Log in to vote
0
Answered by
Zafirua 1348 Badge of Merit Moderation Voter
6 years ago
Edited 6 years ago

It is as simple as this. The following code should be placed in ServerScriptService

-- Processing Section 
game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        for i, child in pairs (Character:GetChildren()) do
            if child:IsA("BasePart") or child:IsA("MeshPart") then
                print(child)
                child.Transparency = 1
            end
        end
    end)
end)

0
`ServerScriptStorage`? TheeDeathCaster 2368 — 6y
0
Lmao ServerScriptService I meant Zafirua 1348 — 6y
Log in to vote
-1
Answered by 6 years ago
Edited 6 years ago

Hi SuperBeeperMan! I can help you out!

This is simple. All you need to do is o do this:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        player:GetChildren()
    end)
end)

There! Simple. If you need help, check these links out:

:GetChildren() function

Player

Hoped I helped! :D -Chez_Guy

0
tysm! but how could i make all limbs invisible? SuperBeeperman 30 — 6y

Answer this question