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

Removing players T-shirt?

So, what I need help with is, when a player joins I want it to remove there T-Shirt... here's what I came up with...

Player = game.Players.LocalPlayer

function PlayerCame(Player)
	Player.Character["Shirt Graphic"]:Remove()
end

game.Players.PlayerAdded:connect(PlayerCame)

note I AM new to scripting, so this is just a guess, also, this is in a local script in StarterPack...

2 answers

✓ Accepted answer

There is also a Decal in the Player's Character's Torso aswell, remove that Decal and the T-Shirt will not show on the Character anymore.

-- Your using both a LocalPlayer kind of script, and a PlayerAdded function, lets change that..
-- Original
Player = game.Players.LocalPlayer
function PlayerCame(Player)
Player.Character["Shirt Graphic"]:Remove()
end
game.Players.PlayerAdded:connect(PlayerCame)
-- New LocalPlayer kind of script
Player = game:service("Players").LocalPlayer
function Joined()
Player.Character:WaitForChild("Shirt Graphic"):remove()
end
Joined()
-- New PlayerAdded function
function PlayerCame(plr)
plr.Character:WaitForChild("Shirt Graphic"):remove()
end
game:service("Players").PlayerAdded:connect(PlayerCame)

I hope this helped!

When using the PlayerAddedeven be sure to use the CharacterAdded event to interact with the player's character. Plus you have to wait for the shirt graphic to load but for some reason my WaitForChild always glitches on me so here you go

script.Parent.Parent.CharacterAdded:connect(function(chr)
	while true do
		local Tee = chr:findFirstChild("Shirt Graphic")
		if Tee then
			Tee:remove()
			break
		else
			wait()
		end
	end
end)

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