game.Players.ChildAdded:connect(function(newP)
if newP.className == "Player" then
if newp.TeamColor == "Survivors" then
game.Teams["Survivors"]G18:Clone().Parent = newP.StarterGear
elseif newp.TeamColor == "Zombies" then
game.Teams["Zombies"]Zombie:clone().Parent = newP.StarterGear
end
end
end)
COMMUNITY QUESTION
What is wrong with this script?
1 answer
Lua is Case Sensitive make ClassName capital
game.Players.ChildAdded:connect(function(newP)
if newP.ClassName == "Player" then
if newP.TeamColor == "COLOR OF TEAM" then
game.Teams["Survivors"]G18:Clone().Parent = newP.StarterGear
elseif newP.TeamColor == "COLOR OF TEAM" then
game.Teams["Zombies"]Zombie:clone().Parent = newP.StarterGear
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
