local shirtemplate = "148302166" -- Took away 1 from the shirt ID local pantstemplate = "133004168" -- Took away 1 from the pants ID local hats = {"1029025","hat 2 id","hat 3 id","even a hat 4 id"} function giveShirtAndPants(p) local c = p.Character c.Shirt.ShirtTemplate = shirtemplate c.Pants.PantsTemplate = shirtemplate for _,v in pairs(hats) do local hat = game:GetService("InsertService"):LoadAsset(v).Parent = c end end game.Players.PlayerAdded:connect(function(p) repeat wait() until p ~= nil repeat wait() until p.Character ~= nil giveShirtAndPants(p) p.CharacterAdded:connect(function(c) repeat wait() until c ~= nil giveShirtAndPants(p) end) end) -- Line 10 says: 11:55:12.611 - Workspace.Script:10: unexpected symbol near '='
I can't fish out the unexpected symbol near '='
I fixed it and massively improved the efficiency of it for you:
local ShirtTemp = "148302166" local PantsTemp = "133004168" local Hats = {"1029025"} function giveShirtAndPants(Plr) local Char = Plr.Character coroutine.resume(coroutine.create(function() repeat wait(1/30) until Char:findFirstChild("Shirt") Char.Shirt.ShirtTemplate = "http://www.roblox.com/asset?id=" .. ShirtTemp end)) coroutine.resume(coroutine.create(function() repeat wait(1/30) until Char:findFirstChild("Pants") Char.Pants.PantsTemplate = "http://www.roblox.com/asset?id=" .. PantsTemp end)) for _,v in next, Hats do local Hat = game:GetService("InsertService"):LoadAsset(v):GetChildren()[1] Hat.Parent = Char end end game:GetService("Players").PlayerAdded:connect(function(Plr) repeat wait(1/30) until Plr ~= nil repeat wait(1/30) until Plr.Character ~= nil giveShirtAndPants(Plr) Plr.CharacterAdded:connect(function(Char) repeat wait(1/30) until Char ~= nil giveShirtAndPants(Plr) end) end)
Try removing .Parent = c
on line 10 and on the next line do:
hat.Parent = c