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
COMMUNITY QUESTION
Attempt to index nil with 'Name' Error. Please help? This is my code.
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
please format it correctly
Oh. Sorry. I am very sorry!
I've edited your post so it should be formatted correctly.