iceman72
|
  |
| Joined: 08 Jun 2008 |
| Total Posts: 786 |
|
|
| 16 Dec 2014 06:35 PM |
Below is two scripts, they should do the same thing, but only the second one works. What did I do wrong with the variables?
key = {"Money","FirstVisit","LastVisit","TotalTime","Kills","Deaths")
function playerEnter (player) local pSlot = script.Players:FindFirstChild(player.Name)
Instance.new("Model",script.Players).Name = player.Name
Instance.new("IntValue",pSlot).Name = "Score" Instance.new("StringValue",pSlot).Name = "FootNote"
for i,v in pairs (key) do --Adding regular fields Instance.new("IntValue",(pSlot)).Name = v end end
game.Players.PlayerAdded:connect(playerEnter)
key = {"Money","FirstVisit","LastVisit","TotalTime","Kills","Deaths")
function playerEnter (player) Instance.new("Model",script.Players).Name = player.Name
Instance.new("IntValue",script.Players:FindFirstChild(player.Name)).Name = "Score" Instance.new("StringValue",script.Players:FindFirstChild(player.Name)).Name = "FootNote"
for i,v in pairs (key) do --Adding regular fields Instance.new("IntValue",(pSlot)).Name = v end end
game.Players.PlayerAdded:connect(playerEnter) |
|
|
| Report Abuse |
|
iceman72
|
  |
| Joined: 08 Jun 2008 |
| Total Posts: 786 |
|
|
| 16 Dec 2014 07:23 PM |
Nvm I am dumb... but smart for finding it! so just regular I guess. Anyone who cares its that I defined pSlot before I make the Model that it refranced |
|
|
| Report Abuse |
|