How do you make a spawn that changes clothes on touch (for example, if a player touches a certain team's spawn the clothes will change to the team's uniform) Can someone please tell me what I am doing wrong. It makes the player naked. (Lol)
local shirtid = "http://www.roblox.com/asset/?id=380839078"
local pantsid = "http://www.roblox.com/asset/?id=24642487"
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid")then
char = hit.Parent
if char:findFirstChild("Shirt") then
char.Shirt.ShirtTemplate = 380839078
else
a = Instance.new("Shirt", char)
a.Name = "Shirt"
a.ShirtTemplate = 380839078
end
if char:findFirstChild("Pants") then
char.Pants.PantsTemplate = 24642487
else
b = Instance.new("Pants", char)
b.Name = "Pants"
b.PantsTemplate = 24642487
end
end
end)
Thank you so much!

1 comment
try subtracting 1 from the ID until it works