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

Clothes Removed On Entry?

I know this is possible, but I can not seem to script it. I am trying to make a script which removes a players clothes and hats on entry. I know it involves the on entry built in function but other then that all attempts have failed. Any help, or even a working script would be much appreciated!

-- Skunk940

Here's the script so far. It removes the shirt but nothing else.

Game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
repeat wait() until character:findFirstChild("Pants")
print("Ready")
wait(1)
shirt = character:findFirstChild("Shirt")
if shirt ~= nil then
shirt:Destroy()
end
priint("Shirt removed")
pants = character:findFirstChild("Pants")
if pants ~= nil then
pants:Destroy()
end
print("Pants removed")
roblox = character.Torso:findFirstChild("roblox")
if roblox ~= nil then
roblox:Destroy()
end
tshirt = character:findFirstChild("Shirt Graphic")
if tshirt ~= nil then
tshirt:Destroy()
end
print("T-Shirt destroyed")
end)
end)

1 comment

1

Give the script your best try first. After that, you can come here and show us your script so we can help you fix it. But there are no requests like this on this forum.

2 answers

✓ Accepted answer

It's actually much simpler than what you're trying to do. There's a property called CanLoadCharacterAppearance() that, when set to false, will cause the character to not load normally, which would include shirts and pants.

game.Players.PlayerAdded:connect(function(plr)
	plr.CanLoadCharacterAppearance = false
end)

1 comment

0

Nice, thanks

In StarterPack

Player=script.Parent.Parent
Character=Player.Character
wait(1)
for i,v in pairs(Character:GetChildren()) do
	if v:IsA("Hat") or v:IsA("Shirt") or v:IsA("Pants") or v:IsA("Shirt Graphic") or v:IsA("CharacterMesh") then
		v:remove()
	end
end

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