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: My first script using Functions - It good?

Previous Thread :: Next Thread 
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
06 Feb 2012 10:28 PM
z = script.Parent.NumValue

function(x)

game.Workspace:BreakJoints()

print(x)

end

if z.Value >= 5 then (x) end

else if z.Value < 5 then return end



I have a feeling this won't work. D:
Report Abuse
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
06 Feb 2012 10:29 PM
Already found one error. :|

*((elseif
Report Abuse
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
06 Feb 2012 10:31 PM
Umm... Bump...
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
06 Feb 2012 10:40 PM
you never added a connector so the function will never start
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
06 Feb 2012 10:41 PM
not to mention other errors =/
at bottom of script you need a connector line though such as
workspace.Part.Touched:connect(function name)
Report Abuse
Thunderx10 is not online. Thunderx10
Joined: 17 Jun 2009
Total Posts: 2316
06 Feb 2012 10:42 PM
You didn't name the function, you have a random argument, and you can't break workspace's joints anymore.
Report Abuse
Thunderx10 is not online. Thunderx10
Joined: 17 Jun 2009
Total Posts: 2316
06 Feb 2012 10:42 PM
@callofrobloxia

No you don't, this is just a function, not a function that uses Touch and stuff.
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
06 Feb 2012 10:47 PM
it still wouldnt run though unless he put a: functionname() after it
Report Abuse
Thunderx10 is not online. Thunderx10
Joined: 17 Jun 2009
Total Posts: 2316
06 Feb 2012 10:57 PM
function nameoffunction(argument)

He doesn't need a connection.
Report Abuse
LuisPambid is not online. LuisPambid
Joined: 31 Mar 2011
Total Posts: 532
07 Feb 2012 05:17 AM
Learn more about functions my friend :/
Report Abuse
callofrobloxiamw3 is not online. callofrobloxiamw3
Joined: 28 May 2011
Total Posts: 488
07 Feb 2012 08:15 PM
well ya he would make the function but the function would be pointless because he never actually ran it just made it
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