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: Clone() is a nil value..?

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2014 01:11 PM
Methods = {
BasePart = {

}
}


function CreateMethod(var, obj, method)
Methods[obj][method] = function(var)
return var:Clone()
end
end


CreateMethod(Workspace.BasePlate, "BasePart", "Copy")

Methods.BasePart:Copy().Parent = Workspace


It says that on line 10;

attempt to call method 'Clone' (a nil value)
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
20 Jun 2014 01:12 PM
"CreateMethod(Workspace.BasePlate, "BasePart", "Copy")"

You're having that return something, are you not? Make it equal a local variable!
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jun 2014 01:12 PM
Well, "var" from "CreateMethod" is being overwritten by "var" from "Methods[obj][method]"
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2014 01:21 PM
Overwriting var... Fail lol. I can't believe I missed that. That variable was from earlier testing. Such a newby error, thanks guys :D


I'll post back with anymore problems I encounter.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2014 01:23 PM
I was overwriting var -_- I can't believe I missed that. That variable was from earlier testing. Such a newby error, thanks guys :D

I'll post back with any problems I encounter.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2014 01:24 PM
Flood check really has to be updated...
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
20 Jun 2014 01:25 PM
Yep.
Decrease the time of Flood Check in S&H.
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
20 Jun 2014 01:26 PM
SH*


~FLOODCHECKED~
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2014 01:43 PM
It works :D

Thanks guys!
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