AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 11:27 AM |
Well, since I'm making a base, I am making a save backpack script. When you die, it will have what you had saved, and clone it from lighting. It is supose to keep doing it every time they respawn, so it saves their backpack forever in that server. I'm still a new scripter, so this is probally wrong in lots of ways..
while true do game.Players.Player.BackPack.("Tools").BackPack:clone() wait() if game.Players.Player.Humanoid.Health==0 then wait(5) game.Players.Player.BackPack:clear() BackPack:clone() end end) end
|
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 22 Jan 2012 11:29 AM |
| Almost everything in that script is wrong. |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
|
| 22 Jan 2012 11:30 AM |
^
Yes, it's unfortunate. I advise that you use connections instead of busy-waiting, for one. |
|
|
| Report Abuse |
|
|
RA2lover
|
  |
| Joined: 09 Nov 2008 |
| Total Posts: 1254 |
|
|
| 22 Jan 2012 11:31 AM |
| you'll need to declare the clone to a variable first(no need to store it in lightning, just to make sure that's his backpack and can be fetched individually). then, you'll need to clone the backup backpack again and place the backpack on the player when he respawns. |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 11:34 AM |
lemme try something different...
while wait() do game.Players.Player.BackPack:SaveInstance("Tools") if game.Players.Player.Humanoid.Health==0 then game.Players.Player.BackPack("Tools"):remove() game.Players.Player.SaveInstance:add() -- What is an add function??? end end) --- Does it loop with while wait() do? end |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 11:40 AM |
Or would I need to do something like: if gun==nil then gun:SaveInstance() if axe==nil then axe:SaveInstance() lots of other weps if game.Players.Player.Humanoid.Health==0 then wait(6) game.Players.Player.BackPack("Tools"):remove() game.Players.Player.BackPack.SaveInstance:clone("Tools") |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 22 Jan 2012 12:54 PM |
| Can't you just clone it into the players' starterpack? |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 12:55 PM |
| Well, I looped it so every second it clones it, but what is the :() that will add it once they die? |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 12:56 PM |
Wait, here is something I'd think would be more efficient..
while wait() do game.Players.Player.BackPack:SaveInstance("Tools") if game.Players.Player.Humanoid.Health==0 then if game.Players.Player.Humanoid.Health==100 then game.Players.Player.BackPack("Tools"):remove() game.Players.Player.SaveInstance:add() -- What is an add function??? end end) --- Does it loop with while wait() do? end |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
|
| 22 Jan 2012 02:14 PM |
Why not at the same time they get the tool, it clones it into their Backpack, AND their Startergear?
† KMXD † |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
C0D3Y
|
  |
| Joined: 24 Jul 2010 |
| Total Posts: 1692 |
|
|
| 22 Jan 2012 02:20 PM |
| Well it will work but I doubt you'll listen to me anyways because that's what I said about 5 posts ago... |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2012 02:23 PM |
@C0d I did, but it's called "StarterGear". :P
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2012 02:24 PM |
| Clone it into the player's StarterGear, so only that player will get it when they respawn. |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 02:41 PM |
So..
while wait() do game.Players.Player.BackPack("Tools"):clone() game.Players.Player.StarterGear:clone() end end)
This seems to simple to work. xP |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 02:42 PM |
| Oh wait, I forgot, if the person has 2 of that tool, how would I delete one? |
|
|
| Report Abuse |
|
|
oogah33
|
  |
| Joined: 12 Oct 2008 |
| Total Posts: 196 |
|
|
| 22 Jan 2012 02:56 PM |
| Do you want it to save every time they buy something or receive something from another source? |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 22 Jan 2012 03:15 PM |
Here is what I'm trying to do: -It saves their backpack and puts all of their tools back into their backpack -There are no double tools |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|