Coutuex
|
  |
| Joined: 07 Feb 2013 |
| Total Posts: 33 |
|
|
| 12 Jan 2015 01:51 AM |
Been working on this script for a while now and it clones what I want but it makes copies even if there is something named your name there. Anyone see what is wrong with this?
accounts = game.ServerStorage.Accounts:GetChildren()
function onSpawn(Char) for i = 1, #accounts do wait(1) if (accounts[i].Name ~= Char.Name) then b = script.Account:Clone() b.Parent = game.ServerStorage.Accounts b.Value = #accounts + 1 b.Name = Char.Name end end end
game.Workspace.ChildAdded:connect(onSpawn) |
|
|
| Report Abuse |
|
|
Coutuex
|
  |
| Joined: 07 Feb 2013 |
| Total Posts: 33 |
|
|
| 12 Jan 2015 01:59 AM |
| Bad time huh? Bumpity bump |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 12 Jan 2015 02:01 AM |
| You only collect the table once. |
|
|
| Report Abuse |
|
|
Coutuex
|
  |
| Joined: 07 Feb 2013 |
| Total Posts: 33 |
|
|
| 12 Jan 2015 02:04 AM |
| How do I put the table in a loop to collect every spawn? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
Coutuex
|
  |
| Joined: 07 Feb 2013 |
| Total Posts: 33 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 12 Jan 2015 02:10 AM |
| I think it's fairly obvious where you're supposed to put it. |
|
|
| Report Abuse |
|
|