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
 

Are all ends supposed to be at the end of an entire script?

Previous Thread :: Next Thread 
tuxedoman23 is not online. tuxedoman23
Joined: 24 Apr 2009
Total Posts: 4670
25 Dec 2012 10:47 PM
If not, please explain why.
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
25 Dec 2012 11:02 PM
Ends only go on:
functions
loops - while,for,etc
if statements

function hi()
--code
end

while true do
--code
wait()
end

for i = 1, 5 do
--code
wait()
end

if condition then
--code
end
Report Abuse
Rukiryo is not online. Rukiryo
Joined: 04 Sep 2009
Total Posts: 1490
25 Dec 2012 11:14 PM
Ends are used on blocks.

Example
print("Hello")
if game.Workspace.MyFriend ~= nil then
print("Hooray my friend is here!")
end
print("Tada")


See, we only want it to say "My friend is here" IF your friend is there. So everything inside that 'if' block happens if the condition is true.

You clearly don't have an idea of what a programming block is, therefore you should not be asking this. It is a BAD idea for you, you'll get confused.

Goto wiki.roblox.com and read the tutorial there.
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