Which is a better way of creating this script that anchors all parts in character?
FIRST SCRIPT:
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(char)
for i, v in pairs (char:GetChildren()) do
if v:IsA("Part") then
v.Anchored = true
end
end
end)
end)]
SECOND SCRIPT:
game.Players.PlayerAdded:connect(function(Player)
local Char = game.Workspace[Player.Name]
for i, v in pairs (Char:GetChildren()) do
if v:IsA("Part") then
v.Anchored = true
end
end
end)

2 comments
You might want to use BasePart instead of Part.
What is difference?