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.
function commands.invisible(sender, args)
local playerinvis = args[1]
if playerinvis == "me" then
local character = sender.Character
local characterClone = character:Clone()
characterClone.Name = tostring(sender.Name).."'s Character"
characterClone.Parent = ServerS
local children = character:GetChildren()
for _, child in pairs(children) do
if child:IsA("MeshPart") or child:IsA("Part") then
child.Transparency = 1
elseif child:IsA("Accessory") then
child:Destroy()
end
end
end
end