generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Save Backpack

Previous Thread :: Next Thread 
AntiFiter is not online. 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 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
22 Jan 2012 11:29 AM
Almost everything in that script is wrong.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 11:30 AM
I know, I'm new :/
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
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 is not online. 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 is not online. 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 is not online. 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 is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 12:34 PM
Anyone?
Report Abuse
C0D3Y is not online. 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 is not online. 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 is not online. 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 is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 01:04 PM
Anyone?..
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 01:19 PM
bump
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 02:07 PM
..
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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 is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 02:16 PM
idk xP
Just will it work?
Report Abuse
C0D3Y is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
22 Jan 2012 02:23 PM
@C0d I did, but it's called "StarterGear". :P

† KMXD †
Report Abuse
RadioactiveWafflez is not online. RadioactiveWafflez
Joined: 25 Jun 2010
Total Posts: 3453
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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 03:47 PM
umm.
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
22 Jan 2012 04:07 PM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image