wait(0.1)
local groupid = script.Configuration.GroupID
local players = game:GetService('Players')
local player = game.Players.LocalPlayer
local config = script.Configuration
local shirt = script.Configuration.Shirt
local pants = script.Configuration.Pants
function SpawnClothes(Players)
if Players:IsInGroup(groupid.Value) then
for i,v in pairs(Players.Character:getChildren()) do
if v.className == "Shirt" or v.className == "Pants" then
v:remove()
end
end
script.Configuaration.Shirt:Clone()
shirt.Parent = Players.Character
script.Configuaration.Pants:Clone()
pants.Parent = Players.Character
end
end
function PlayerRespawned(Player)
SpawnClothes(Player)
Player.Changed:connect(function(property)
if (property == "Character") then
SpawnClothes(Player)
end
end)
end
game.Players.ChildAdded:connect(PlayerRespawned)
Can someone tell me why this won't work?
