local children = game.Workspace:GetChildren()
for i = 1, #children do
if children[i].className == "Model" then
local humanoid = children[i]:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
local shirt = humanoid.Parent:FindFirstChild("Shirt")
if (shirt ~= nil) then
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=21849553"
else
local gimme = game.Lighting.Shirt
copy = gimme:clone()
copy.Parent = children[i].Parent
end
end
end
end
this script will change the shirt id of people and if they dont have a shirt it clones a shirt(with the right id on it) onto that person
(the shirt is in the lighting just to let you know)
for i,v in pairs(game.Players:GetPlayers()) do
if v.Character ~= nil then
local shirt = v.Character:findFirstChild("Shirt")
if (shirt ~= nil) then
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=21849553"
else
local gimme = game.Lighting.Shirt
copy = gimme:clone()
copy.Parent = v.Character
end
end
end
-- Did you need this to happen automatically when people spawn?
Nope. Just put this script in the starterpack:
v = script.Parent.Parent
repeat wait() until v.Character ~= nil
local shirt = v.Character:findFirstChild("Shirt")
if (shirt ~= nil) then
shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=21849553"
else
local gimme = game.Lighting.Shirt
copy = gimme:clone()
copy.Parent = v.Character
end