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: Scripting Beginner (I really just started 5 minutes ago)

Previous Thread :: Next Thread 
spawn0again is not online. spawn0again
Joined: 05 Aug 2009
Total Posts: 6543
29 Dec 2013 01:48 PM
function twoPlusTwo()
x = 2 + 2
print(x)
end

twoPlusTwo()

----------------------------

How do i "call" for this to work?
Report Abuse
spawn0again is not online. spawn0again
Joined: 05 Aug 2009
Total Posts: 6543
29 Dec 2013 01:48 PM
Sorry for being a noob, but just please help.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
29 Dec 2013 01:48 PM
That's how you do it.

twoPlusTwo()
Report Abuse
spawn0again is not online. spawn0again
Joined: 05 Aug 2009
Total Posts: 6543
29 Dec 2013 01:49 PM
In what? chat? Command? how do i do it?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Dec 2013 01:50 PM
In a script object or in the command bar.
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
29 Dec 2013 01:51 PM
You can copy and paste it in the Command Bar, then press enter or you can put it in a Script and press the green Play arrow button.
Report Abuse
spawn0again is not online. spawn0again
Joined: 05 Aug 2009
Total Posts: 6543
29 Dec 2013 01:51 PM
Once i enter it into the command bar what should happen? -_- this maks me seem so stupid.
Report Abuse
jtfriend137 is not online. jtfriend137
Joined: 19 Jul 2010
Total Posts: 1960
29 Dec 2013 01:52 PM
You can also call the function with "Events", but that is a bit more complicated. Read the Wiki to learn about Events.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Dec 2013 01:53 PM
It should show "4" in the output
Report Abuse
jtfriend137 is not online. jtfriend137
Joined: 19 Jul 2010
Total Posts: 1960
29 Dec 2013 01:53 PM
Also, make sure you have the Output window open. When you run that in the command bar you should see "4" in the Output window.
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
29 Dec 2013 01:55 PM
To call it you just need to say twoPlusTwo() in the script and the function will run when the script will run.

~Kingmouli, King of the Mouli~
Report Abuse
spawn0again is not online. spawn0again
Joined: 05 Aug 2009
Total Posts: 6543
29 Dec 2013 01:58 PM
Thanks guys, I will be back >:D
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