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

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

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)

1 comment

0

Working on a script right now

3 answers

✓ Accepted answer
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)

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)

2 comments

0

ServerScriptStorage?

0

Lmao ServerScriptService I meant

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

1 comment

0

tysm! but how could i make all limbs invisible?

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