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: Rpg, Save Instance Help, Preferably a Wiki Writer!

Previous Thread :: Next Thread 
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 12:50 PM
I basically need the code that saves the Backpack! and Loads it from a GUI
All I need is some of the code like
player:SaveInstance
that type of stuff, The rest I have done.

I have kept trying but I can't!

And It is curtail for my Rpg. Please don't take it negatively.
I desperately need help!
Report Abuse
AdamantTale is not online. AdamantTale
Joined: 03 Apr 2010
Total Posts: 250
07 Mar 2012 12:51 PM
"I basically need"
You don't need it.
And we don't take requests.
Report Abuse
AdamantTale is not online. AdamantTale
Joined: 03 Apr 2010
Total Posts: 250
07 Mar 2012 12:52 PM
And, you could get all the children of their backpack then save them as a model. :P
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 01:05 PM
>_> A wiki writer helped me before, But I lost the Post =/
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 01:17 PM
Please could you help just use some of your time to FIX this then.
And I can't get an output =/
But look for obvious signs of errors =/

wait(1)
Player = script.Parent.Parent.Parent.Parent.Parent
Text = script.Parent.Text
Button = script.Parent

function OC()
Button.Text = "Loading Data"
Player:WaitForDataReady()
stats = Player:FindFirstChild("leaderstats")
if stats then
Button.Text = "Loading"
c = stats:GetChildren()
for i = 1,#c do
wait()
if c[i].className == "IntValue" then
c[i].Value = Player:LoadNumber(c[i].Name)
end
Player.Quest1.Value = Player:LoadBoolean("Quest1")
Player.Backpack = Player:LoadInstance("Backpack")
end
Button.Text = "Load Done"
else
Button.Text = "No stats"
end
wait(3)
Button.Text = "Load"
end

Button.MouseButton1Click:connect(OC)

I know that error's Well Does not work.
But this one I'm not sure, I can't test it. Without saving =/

script.Parent.MouseButton1Down:connect(function(p)
local Saver = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("leaderstats")
if Saver ~= nil then
Saver.Parent:WaitForDataReady()
Saver.Parent:SaveNumber("Xp", Saver.Xp.Value)
Saver.Parent:SaveNumber("Gold", Saver.Gold.Value)
Saver.Parent:SaveBoolean("Qu1", Saver.Parent.Quest1.Value)
Saver.Parent:SaveNumber("Level", Saver.Level.Value)
local score = Saver.Parent.Backpack:GetChildren() -- Targeting the scores before the player is gone
for i = 1, #score do
Saver.Parent:SaveInstance("Backpack", score)

end
end
end)

Thanks,

Ford.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 01:22 PM
Bump.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 01:29 PM
Bump!
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 01:43 PM
Bump!!
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 01:56 PM
Bumpheh.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 02:29 PM
PLEASE HELP!
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
07 Mar 2012 02:38 PM
Bleh. just because someone is labelled a "wiki writer" doesn't mean they can code better than those whom are not.

I'd save the data using strings and having the tools/hopperbins in a model in lighting. Then, when saving, save the strings as the weapon name.

"Bro five! Wear this to let everyone know you think they deserve a high five."
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 02:44 PM
Can you do the code for me, I'm in a cast, Its not easy to code =/
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
07 Mar 2012 02:58 PM
@nate: those who* are not

@tehepicford: In the script you posted, you're saving each of the items in the backpack as "Backpack". Every time you save a value to the index "Backpack", it overwrites the one that is already there. You either need to save just one instance (model with all the stuff in it?), or you need to find a different way to save the things.

also, i r wiki writer :D
Report Abuse
crazytomato4 is not online. crazytomato4
Joined: 09 Feb 2011
Total Posts: 1368
07 Mar 2012 03:05 PM
Oh, also, you can't say `Player.Backpack = stuff`. It just doesn't work like that.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
07 Mar 2012 03:18 PM
Sorry grammar freak that I was writing something else then decided to erase what I had written and write something else, not noticing my error. Oh the sorrow! Please, please forgive!


"Bro five! Wear this to let everyone know you think they deserve a high five."
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 03:27 PM
Can you just help! Its hard to type with my arm D=
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 03:37 PM
Please.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 03:57 PM
Bumpeteh Bump!
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 04:13 PM
Sad face =(
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 04:23 PM
=(
Report Abuse
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
07 Mar 2012 04:24 PM
It would be great if you stopped BUMPING AND SPAMMING so us other players can get help.
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 04:34 PM
I need help on it getting fixed Moron!
Report Abuse
tehepicford is not online. tehepicford
Joined: 26 Aug 2011
Total Posts: 1486
07 Mar 2012 04:44 PM
HELP BUMP!!!!!!!!
Report Abuse
adark is not online. adark
Joined: 13 Jan 2008
Total Posts: 6412
07 Mar 2012 04:50 PM
Seeing as you are typing with impeccible spelling, if not grammar, it can be assumed that, even if you have a cast, it does not get in the way of your typing.

We will not write a script for you, but if you post one we will do what we can to fix it. That includes spelling and context errors.

Don't make the excuse that you can't type code because of a cast when it is obvious that you are not impaired.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
07 Mar 2012 04:52 PM
Long time no see SH...Soz for trollin...
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