Attempt to index nil with 'Name' Error. Please help? This is my code.
Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
01 | function commands.invisible(sender, args) |
02 | local playerinvis = args [ 1 ] |
03 | if playerinvis = = "me" then |
04 | local character = sender.Character |
05 | local characterClone = character:Clone() |
06 | characterClone.Name = tostring (sender.Name).. "'s Character" |
07 | characterClone.Parent = ServerS |
08 | local children = character:GetChildren() |
09 | for _, child in pairs (children) do |
10 | if child:IsA( "MeshPart" ) or child:IsA( "Part" ) then |
11 | child.Transparency = 1 |
12 | elseif child:IsA( "Accessory" ) then |