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

What is wrong with this script?

Asked by 10 years ago
1game.Players.ChildAdded:connect(function(newP)
2if newP.className == "Player" then
3if newp.TeamColor == "Survivors" then
4game.Teams["Survivors"]G18:Clone().Parent = newP.StarterGear
5elseif newp.TeamColor == "Zombies" then
6game.Teams["Zombies"]Zombie:clone().Parent = newP.StarterGear
7end
8end
9end)

1 answer

Log in to vote
0
Answered by 10 years ago

Lua is Case Sensitive make ClassName capital

1game.Players.ChildAdded:connect(function(newP)
2if newP.ClassName == "Player" then
3if newP.TeamColor == "COLOR OF TEAM" then
4game.Teams["Survivors"]G18:Clone().Parent = newP.StarterGear
5elseif newP.TeamColor == "COLOR OF TEAM" then
6game.Teams["Zombies"]Zombie:clone().Parent = newP.StarterGear
7end
8end
9end)
Ad

Answer this question