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

How do I make the player invisible in a way that it won't glitch if other parts are added to player?

A youtube video I checked out on how to turn the player transparent said that I should loop through the character like so:

for i,v in pairs(character:GetChildren()) do
	if v:IsA("Part") or v:IsA("MeshPart") then
		v.Transparency = 1
	end
end

And I thought to myself, is this a secure way doing it? Because if any other parts are added to the player then won't it turn that invisible as well? I that something I should even be concerned about and is this even a good way to go about it?

1 answer

✓ Accepted answer

###I doubt the player will have time to add parts to their character. They'll have to load up the exploit. The loop will end once it iterates through all children in the character.

for i, v in pairs(character:GetChildren()) do
    if v:IsA("BasePart") then -- shorter method of checking if part
        v.Transparency = 1
    end
end

5 comments

0

I am not worried about exploits. Just wondering if that would be something I should be concerned about.

0

Thanks

0

This is in an admin script btw

0

Not really to be worried about.

0

Ok thanks

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