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

Player's shirt not changing?

I am making something where It makes you wear a shirt automatically.

person = game.Players.LocalPlayer.Character
if person.Shirt ~= nil then -- Means if it isn't nil or not.
	person.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=133991511"
else
	shirt = Instance.new("Shirt")
	shirt.Name = "Shirt"
	shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=133991511"
end

It will not work. Help?

Thank you for the help.

2 comments

0

Fixed the if statement.

0

Try again.

1 answer

The template of the shirt won't change online so you have to Clone the shirt into the player, I have done this myself and was also frustrated at the fact of it not working. So try this.

x = Instance.new("Shirt")
x.ShirtTemplate = "http://www.roblox.com/asset/?id=133991511" -- If you have not -1 from the end for the shirt I'D
game.Players.PlayerAdded:connect(function(plr)
z = plr.Character:GetChildren()
for i = 1,#z do
if z[i].Name = "Shirt" then
z[i]:Destroy()
x:Clone().Parent = plr.Character
end
end
	

If this helped +1, if this answered question check mark :)

3 comments

0

The if statement is wrong.

0

It's still wrong.

0

?

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