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: odd error, please help

Previous Thread :: Next Thread 
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
15 Mar 2013 10:37 PM
error: "Parent property of Breakables is locked"

NOTE: This is part of a much larger script



cache = workspace.Breakables:clone()


function restartGame(reason)
msg("ERROR: "..reason..". Restarting...")
workspace.Breakables:Destroy()
cache.Parent = workspace
cache:MakeJoints()
local items = workspace:children()
for i = 1, #items do
if items[i].Name == "Zed" or items[i].Name == "Tank" or items[i].Name == "Boomer" then
items[i]:Destroy()
end
end
spawnPlayers("lobby")
end
Report Abuse
kubuto2 is not online. kubuto2
Joined: 16 Jul 2008
Total Posts: 1275
15 Mar 2013 10:45 PM
Under msg do:
if not Workspace:findFirstChild("Breakables") then return end
Report Abuse
BornLeader1 is not online. BornLeader1
Joined: 02 Jun 2011
Total Posts: 1795
15 Mar 2013 11:32 PM
You also did concatenation wrong.
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
16 Mar 2013 07:42 AM
No nothing is wrong with the concatenation. Still getting the same error btw
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
16 Mar 2013 07:48 AM
It seems that you are trying to do something with a locked property.

What is the parent property of breakables, and what were you trying to do with it?
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
16 Mar 2013 10:39 AM
Its parent is workspace. I clone it, destroy it, and parent the clone to workspace.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
16 Mar 2013 10:43 AM
What is the classname of breakables?
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
16 Mar 2013 10:48 AM
Model
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
16 Mar 2013 10:49 AM
hm
Are you sure it's that line that is causing the error? What is inside the breakables model?
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
16 Mar 2013 10:52 AM
parts
Report Abuse
StealthKing95 is online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
16 Mar 2013 12:05 PM
and in this thread lies all the code that handles the model
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
16 Mar 2013 12:36 PM
:Destroy() locks an instance, meaning you can do nothing with it.

Use :Remove() in this case.
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