Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make a Roblox player completely invisible?

Below is my current code and it works however, not for the accessories they are still visible. Can someone help me include the accessories-all mesh parts?

Thank You in advance

function setTransparency(char, value)
    for _, child in pairs(char:GetChildren()) do
        if child:IsA('Hat') and child:FindFirstChild("Handle") then
            child = child.Handle
        elseif child:IsA('BasePart') then
            child.Transparency = value
        end
    end
end

local enabled = true
workspace.TransPart.Touched:connect(function(hit)
    local char = hit.Parent
    if char then
        local head = char:FindFirstChild("Head")
        local face = head:FindFirstChild("face")
        if enabled and head and game.Players:GetPlayerFromCharacter(char) then
            enabled = false
            for t = 0, 1, .1 do
                if face then face.Transparency = t end
                setTransparency(char, t)
                wait(0.1)
            end
            wait(10)
            for t = 1, 0, -.1 do
                if face then face.Transparency = t end
                setTransparency(char, t)
                wait(0.1)
            end
            wait(2)
            enabled = true
        end
    end
end

1 answer

By accessories do you mean their legs & such?

If so; you're better off; if you want the player to be permanently invisible, to just go in Studio, Press the top tab "Plugins" Build Rig & select R6/R15 & then make that model invisible in Workspace; Group in & call the group StarterCharacter & place the group into the folder outside of workspace called "StarterPlayer".

3 comments

0

By accessories, I think he means stuff like hats and hair

0

Yes, to Dr_Smartypants. The characters currently turn invisible but, only face, head and body...not their accessories such as hats, capes, pauldrons..etc. I need help including accessories and mesh parts.

0

Your code is gonna be a loonggg code lol

This discussion is preserved as it was. New answers, comments, and votes are closed.