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

How to make a Roblox player completely invisible?

Asked by 3 years ago
Edited 3 years ago

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

Log in to vote
0
Answered by 3 years ago

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".

0
By accessories, I think he means stuff like hats and hair Dr_Smartypants123 86 — 3y
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. shutemupschuetz 0 — 3y
0
Your code is gonna be a loonggg code lol FLIPPER4440 21 — 3y
Ad

Answer this question