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: What's up with this model saving tool script?

Previous Thread :: Next Thread 
KuchiBoy is not online. KuchiBoy
Joined: 29 Aug 2008
Total Posts: 5374
07 Jul 2011 01:22 PM
--------------------------------------------------BEGIN CODE
tool = script.Parent
function click(mouse)
t = mouse.Target
if t~=nil and t.Parent ~= game.Workspace and t.Locked == true then
script.Parent.Parent.Parent:SaveInstance("ConstructModel1", t.Parent)
print("successfully saved"..t.Parent.Name)
end

end

function selected(mouse)
mouse.Icon = ""
mouse.Button1Down:connect(function () click(mouse) end)
end

tool.Selected:connect(selected)

---------------------------------------------------------END CODE


It isn't giving any errors, and it isn't printing. What's wrong?
Report Abuse
KuchiBoy is not online. KuchiBoy
Joined: 29 Aug 2008
Total Posts: 5374
07 Jul 2011 01:22 PM
EDIT: I also have a load tool:

------------------------------BEGIN
tool = script.Parent
function click(mouse)
script.Parent.Parent.Parent:WaitForDataReady()
local part = script.Parent.Parent.Parent:LoadInstance("ConstructModel1")
part.Parent = Workspace
print("successfully loaded"..part.Name)
end

function selected(mouse)
mouse.Icon = ""
mouse.Button1Down:connect(function () click(mouse) end)
end

tool.Selected:connect(selected)
--------------------------------END
Report Abuse
socccerstar is not online. socccerstar
Joined: 23 Aug 2008
Total Posts: 489
07 Jul 2011 01:34 PM
I may be wrong, but when tools are equipped, aren't they located in the character, not the player?
Report Abuse
KuchiBoy is not online. KuchiBoy
Joined: 29 Aug 2008
Total Posts: 5374
07 Jul 2011 01:36 PM
This tool is a hopperbin. Should have mentioned that.
Report Abuse
KuchiBoy is not online. KuchiBoy
Joined: 29 Aug 2008
Total Posts: 5374
07 Jul 2011 01:50 PM
No help?
Report Abuse
lucas668 is not online. lucas668
Joined: 18 Jun 2008
Total Posts: 6183
07 Jul 2011 01:54 PM
Hopperbins run scripts locally. Local scripts cannot access data saving/loading, so you have to use something else. A tool might work.
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
07 Jul 2011 01:54 PM
I know really nothing about DP, but if I am correct I think you need to wait for the data to be ready (this happens in an online server only, therefore you can't test it in roblox studio) and only then you can save or load data.
Report Abuse
KuchiBoy is not online. KuchiBoy
Joined: 29 Aug 2008
Total Posts: 5374
07 Jul 2011 01:58 PM
@blox
I know this. It's only needed while loading.
Report Abuse
KuchiBoy is not online. KuchiBoy
Joined: 29 Aug 2008
Total Posts: 5374
07 Jul 2011 02:01 PM
Found the problem, I think. It's because it only saved models if it was locked. Foolish mistake. I'm also making a tool.
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