Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't this uniform script work?

Asked by 10 years ago
01wait(0.1)
02 
03local groupid = script.Configuration.GroupID
04 
05local players = game:GetService('Players')
06local player = game.Players.LocalPlayer
07 
08local config = script.Configuration
09 
10local shirt = script.Configuration.Shirt
11local pants = script.Configuration.Pants
12 
13 
14function SpawnClothes(Players)
15if Players:IsInGroup(groupid.Value) then
View all 35 lines...

Can someone tell me why this won't work?

1 answer

Log in to vote
0
Answered by 10 years ago

Might have been just a simple error. Is the configuration in the script or a parent? If not, I would do; Then, put shirts and pants in the script. Also, put your group ID in the if Playerz:IsInGroup(0) then

01function SpawnClothes(Playerz)
02if Playerz:IsInGroup(80738) then --Group ID
03for i,v in pairs(Playerz.Character:getChildren()) do
04if v.className == "Shirt" or v.className == "Pants" then
05v:remove()
06end
07end
08Shirt = script.Shirt:clone()
09Shirt.Parent = Playerz.Character
10Pants = script.Pants:clone()
11Pants.Parent = Playerz.Character
12end
13end
14 
15function PlayerRespawned(Player)
View all 24 lines...
Ad

Answer this question