ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 03 Jan 2013 04:43 PM |
game.Players.PlayerRemoving:connect(function(p) p:WaitForDataReady() Model = p.PlayerGui:FindFirstChild("Lok") if Model then p:SaveInstance(Model) end end) ------------------------------
Now this is in a script in the workspace, if the player leaves it should save the IntValue called "Lok" if the lok is in the player it will prevent a gui from spawning, this is good but I need to know if this will work, if it does then how will I load the "Lok" thing , not it's value but the IntValue it's self. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2013 04:49 PM |
| You forgot to indicate what variable the model will be saved to. |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 03 Jan 2013 04:56 PM |
game.Players.PlayerRemoving:connect(function(p) p:WaitForDataReady() repeat wait() Model = p.PlayerGui:FindFirstChild("Lok") until Model ~= nil if Model then p:SaveInstance("Lock",Model) end end) -----------------------------------
This waits until the player fills out the gui and then get's the IntValue named "Lok"
then this loads it but it wont work-
game.Players.PlayerAdded:connect(function(p) p:WaitForDataReady() Parts = p:LoadInstance("Lock") wait() Parts.Parent = p end) |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 03 Jan 2013 05:19 PM |
| Just do player:LoadInstance("Lock") and remove the rest. |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
crouton04
|
  |
| Joined: 07 Jul 2010 |
| Total Posts: 4459 |
|
|
| 03 Jan 2013 06:56 PM |
game.Players.PlayerAdded:connect(function (p) p:WaitForDataReady() wait() p:LoadBoolean("Lock") end)
game.Players.PlayerRemoving:connect(function (plr) plr:WaitForDataReady() wait() p:SaveBoolean("Lock",Lock.Value) -- guessing it's a boolean.. end) |
|
|
| Report Abuse |
|
|