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

Anyone got a script that when you insert it to a model, that model would see everything invisible?

Asked by 2 years ago
Edited 2 years ago

I ran out of characters in the title so I couldn't say everything specifically.

Basically, I want a script that when you insert it inside a humanoid model, that humanoid model would see parts, models, decals, texture, or everything completely transparent/invisible. Any help?

I'm new to scripting so don't bash me.

1 answer

Log in to vote
0
Answered by 2 years ago
for _, instance in pairs(game.Workspace:GetDescendants()) do
    if instance:IsA("BasePart") and instance.Transparency == 1 then
        instance.Transparency = 0.5
    end
end

If you pop that into a Character as a LocalScript, every part in the workspace with a transparency 1 will get a new transparency of 0.5.

However, some parts (like the HumanoidRootPart of characters) should probably stay fully transparent. Therefore, you'll want to add some checks to make sure you're targeting the parts you actually want to change. You can accomplish this any number of ways (eg. where the part is in the workspace, tagging the part with a tag value, or tagging the part using CollectionService).

Ad

Answer this question