Advertisement
Guest User

ROBLOX Scripting Notes

a guest
Aug 25th, 2019
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. (): Part of script
  2. []: not part of script, insert inside.
  3. {}: not compulsory to type in all scripts.
  4.  
  5. print(""): prints to output, text in purple.
  6.  
  7. wait(): wait time for script to execute
  8.  
  9. warn(""): displays exact time, text in orange.
  10.  
  11. --: to make notes in scripts, script ignores line.
  12.  
  13. game.[service].[item].[property]: to reference something from the game in a script.
  14.  
  15. Boolean Value: only true or false.
  16.  
  17. Anchored: stays/can move in place, can/cannot be moved, only true or false.
  18.  
  19. Variable: Stores data. (Must be named, then insert =, and then define the data object.)
  20.  
  21. Instance.new: To make another item.
  22.  
  23. Vector3: To position a part, X,Y,Z axis used.
  24.  
  25. While Loops:Loops a script forever.
  26.  
  27. For Loops: Loops a script for a desired amount.
  28.  
  29. i = x,y,z = I = Counter, X = Starting Value, Y = Terminating Value, Z = increase of the number per loop.
  30.  
  31. Function: Runs a script, but must be told to run. (Define before calling it.)
  32.  
  33. Arguments: Substitutes the variables, and coding.
  34.  
  35. Parameters: Like variables, basically a type of function, has to be in order, (eg. 1,2).
  36.  
  37. Event: Something happens when triggered (by a part, coding, etc.)
  38.  
  39. ..player.Name: When we don't know the name of a player.
  40.  
  41. If statements: Allows a script to perform if met requirements / conditions.
  42.  
  43. Relational Operator: Used as a condition to compare two values (or more).
  44. Table: (Operator, Meaning, Example)
  45. <, Less Than, 3 < 5, true
  46. >, Greater Than, 3 > 5, false
  47. <=, Less than or equal to, 5 <= 5, true
  48. >=, Greater than or equal to, 3 >= 5, false
  49. ==, Equals, 3 == 5, false
  50. -=, Does not equal, 3 -= 5, true
  51.  
  52. Boolean Operators: Allows more than 1 condition in the If statement, has 3 Values, 'and, or, not'.
  53. 'And' allows more than 2 conditions to be put in the If statement, for the statement to execute, both needs to be true.
  54. 'Or' is the same as 'And' but allows one to be false if wanted. At least one should be true, for the script to be executed.
  55. 'Not' is a Boolean Value that makes the script to be opposite.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement