drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 01 Mar 2014 05:26 PM |
I con't figure out why, it looks perfect to me (well, its a bit messy):
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local Collectables = player:LoadInstance("Collectables") if Collectables == nil or not player:FindFirstChild("Collectables") then local Stats = {"Test"} local Exists = player:FindFirstChild("Collectables") if not Exists then local CollectableFldr = Instance.new("Configuration",player) CollectableFldr.Name = "Collectables" for i=1,#Stats do local NewStat = Instance.new("IntValue",CollectableFldr) NewStat.Name = Stats[i] local Unlcked = Instance.new("BoolValue", NewStat) Unlcked = false end end else if player:FindFirstChild("Collectables") then player.Collectables:Destroy() Collectables.Parent = player else Collectables.Parent = player end end end) game.Players.PlayerRemoving:connect(function(player) Player.Collectables:SaveInstance("Collectables") end) |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2014 05:28 PM |
Shouldn't it be elseif this
else
Not else If this
else
I.e make it an "elseif" and remove one of the ends Might work |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
|
| 01 Mar 2014 05:32 PM |
"Nope" Did u even try what I said? Make the else if Into elseif..
If this then Dostuff elseif this then Dootherstuff Else Dothisotherthing |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
| |
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 01 Mar 2014 05:46 PM |
unless this isn't what you meant: game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local Collectables = player:LoadInstance("Collectables") if Collectables == nil or not player:FindFirstChild("Collectables") then local Stats = {"Test"} local Exists = player:FindFirstChild("Collectables") if not Exists then local CollectableFldr = Instance.new("Configuration",player) CollectableFldr.Name = "Collectables" for i=1,#Stats do local NewStat = Instance.new("IntValue",CollectableFldr) NewStat.Name = Stats[i] local Unlcked = Instance.new("BoolValue", NewStat) Unlcked = false end end elseif player:FindFirstChild("Collectables") then player.Collectables:Destroy() Collectables.Parent = player else Collectables.Parent = player end end) game.Players.PlayerRemoving:connect(function(player) Player.Collectables:SaveInstance("Collectables") end) |
|
|
| Report Abuse |
|
|