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: Place Backup Script

Previous Thread :: Next Thread 
Malcolt3 is not online. Malcolt3
Joined: 17 Dec 2009
Total Posts: 11442
30 Jun 2012 01:52 PM
The following code is supposed to create a stringvalue for each part in the workspace detailing its classname, name, position, and size, but it doesn't work when I try it out.




function epic()

local a = game.Workspace:GetChildren()
for i =1,#a do

if a[i].className == "Part" then
local a2 = Instance.new("StringValue")
a2.Value = a.className.." "..a.Name.." "..a.Size.X.." "..a.Size.Y.." "..a.Size.Z.." "..a.Position.X.." "..a.Position.Y.." "..a.Position.Z.." "
a2.Parent = script
a:remove()
end

end


while true do
epic()
wait()
end
Report Abuse
Malcolt3 is not online. Malcolt3
Joined: 17 Dec 2009
Total Posts: 11442
30 Jun 2012 03:48 PM
Does anyone know how to script?
Report Abuse
Malcolt3 is not online. Malcolt3
Joined: 17 Dec 2009
Total Posts: 11442
03 Jul 2012 07:32 AM
Please answer.
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 Jul 2012 07:39 AM
You better don't say that "Does anyone even know how to script?" if you make faults in your own script.



function epic()

local a = game.Workspace:GetChildren()
for i =1,#a do

if a[i].className == "Part" then
local a2 = Instance.new("StringValue")
a2.Value = a[i].className.." "..a[i].Name.." "..a[i].Size.X.." "..a[i].Size.Y.." "..a[i].Size.Z.." "..a[i].Position.X.." "..a[i].Position.Y.." "..a[i].Position.Z.." " --You failed here?
a2.Parent = script
a[i]:remove() --Euhm.... huh?
end

end


while true do
epic()
wait()
end
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
03 Jul 2012 07:40 AM
As I read that I thought like "that guy means he's something better...".
Report Abuse
Malcolt3 is not online. Malcolt3
Joined: 17 Dec 2009
Total Posts: 11442
03 Jul 2012 12:31 PM
._.
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