Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Attempt to index nil with 'Name' Error. Please help? This is my code.

Asked by 4 years ago
Edited by youtubemasterWOW 4 years ago

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
0
please format it correctly jediplocoon 877 — 4y
0
Oh. Sorry. I am very sorry! messi55313 -2 — 4y
0
I've edited your post so it should be formatted correctly. youtubemasterWOW 2741 — 4y

Answer this question