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: WOAH- NEVER SEEN DIS B4.

Previous Thread :: Next Thread 
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:18 AM
"Something unexpectedly tried to set the parent of GUICloner to NULL while trying to set the parent of GUICloner. Current parent is PlayerGui."

What. The. Heck.

Since when?

That's odd.

How am I supposed to use that? Bad description much? Doesn't say which script tried to set the parent of GUICloner.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:24 AM
my game is once again messed up and i will once again have to revert it to its crappy old version
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:28 AM
This is GUICloner's source:

do
local Player = script.Parent.Parent
if Player:FindFirstChild("AutoBFSpawn") then
if Player.AutoBFSpawn.Value == true then
script.Parent.Parent.Parent.Character:MoveTo(Workspace.Battlefield["BattlefieldSpawn"..math.random(1,4)].Position)
for _, x in pairs(_G.Storage.Server_Data.BattlefieldWeapons:GetChildren()) do
x:Clone().Parent = script.Parent.Parent.Parent.Backpack
end
script.Parent:Destroy()
else
_G.GiveMenu(Player)
script:Destroy()
end
else
_G.GiveMenu(Player)
script:Destroy()
end
end
Report Abuse
SCARFACIAL is not online. SCARFACIAL
Joined: 28 Jan 2010
Total Posts: 7970
07 Oct 2012 04:32 AM
At lest yours is more descriptive than my version.
"Something unexpectedly tried to set the parent of Model to NULL while trying to set the parent of Model. Current parent is InsertService."

Might I add my game doesn't ever use InsertService.
Anyways, no clue how to fix. D:
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:35 AM
NOOOOOOOOOOOOOOOOOOOOOOOOOOOO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OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I got so far and now thisss??? beeep beep beep we need an admin to post
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:37 AM
Also, the client crashes.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:39 AM
It's obviously something in GUICloner, because when I comment out the script I don't get the error.

weeirrd.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:43 AM
Fixed by removing "script:Destroy()"

But I can usually do that...why it error now?
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 04:48 AM
*that weird feeling*
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Oct 2012 05:09 AM
Try using the Remove function.. Like:

script:Remove()
script.Disabled = true


That will set the parent to nil and stop the script from functioning, As Removed items still function.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 05:26 AM
^

gtho
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Oct 2012 05:27 AM
.. It works for me when I get that error, which is very rarely..
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 05:29 AM
Oh, alrighty then.

It's just that :Destroy() and :Remove() are nearly identical, and :Remove() is deprecated, and there's no need to .Disabled = false if the script has ran (I think), so I just thought...
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Oct 2012 05:31 AM
Well, if you're using while true do loops, it's useful for the .Disabled = false, so the script doesn't keep running and lag up your game :)
I know :Remove() is deprecated, but somtimes :Remove() is helpful if you get errors when using :Destroy()
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
07 Oct 2012 05:32 AM
That's perplexing...

Would adding it to debris, instead of using "Destroy()" work just as well?

"Contact me if you are interested in becoming a developer, innovator, or recruiter for CSA."
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
07 Oct 2012 05:34 AM
I don't like using debris, because it's kinda useless when you have :Destroy() and :Remove()

But, that might work as well..
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
07 Oct 2012 05:39 AM
Well, you're not supposed to use Remove(), which is why I suggested Debris. I am questioning why you can use "Destroy()" on the Debris service...

I looked at the wiki, but it doesn't really specify what Debris does to the object where I looked. So I can't tell.

"Contact me if you are interested in becoming a developer, innovator, or recruiter for CSA."
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 05:40 AM
Yes, debris usually solves this kind of problem.

But it's much more efficient to use :Destroy()
Report Abuse
8SunTzu8 is not online. 8SunTzu8
Joined: 30 Sep 2011
Total Posts: 8199
07 Oct 2012 05:41 AM
Maybe you could re-code it differently, and it might solve the issue and let you use Destroy(). Or maybe a mod or admin with a lot of knowledge can enlighten us. Otherwise, that's all I've got for you.

"Contact me if you are interested in becoming a developer, innovator, or recruiter for CSA."
Report Abuse
BAUER102 is not online. BAUER102
Joined: 03 Apr 2010
Total Posts: 5936
07 Oct 2012 07:13 AM
It's a studio bug.

Sorcus said they are working on it somewhere.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
07 Oct 2012 07:25 AM
Remove and Destroy are very different.


If you are trying to make the script still work yet not exist, your best bet is to use Remove. Still risky though.
Report Abuse
eJorge is not online. eJorge
Joined: 09 Jun 2011
Total Posts: 5966
07 Oct 2012 07:26 AM
Use addItem, it works for me.
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 09:06 AM
addItem?
Report Abuse
doombringer42 is not online. doombringer42
Joined: 13 Nov 2007
Total Posts: 5445
07 Oct 2012 09:12 AM
game.Debris:AddItem(instance, delay)

¬ SHG Scripter Tier-2 ♣ LuaLearners Elite
Report Abuse
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
07 Oct 2012 09:18 AM
Oh. Thought you meant something else, that adds an item, not destroys it with a delay :P
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