Here's a variable with numbers:
1 | AnyName = 31 |
With a number variable you can do this:
1 | wait(anyname) |
It will wait 31 seconds.
String variable:
1 | AnyName = "Text" |
With a string variable, you can do this:
1 | print (anyname) |
It will print 'Text' in the output
And last but not least, the Object variable:
1 | AnyName = game.Workspace.Part --example |
With an Object Variable you can do this:
1 | AnyName.CFrame = CFrame.new( 32 , - 299 , 333 ) |
Changes the Objects location
And:
1 | AnyName:clone().Parent = Workspace |
Copies the Object and puts it into Workspace, but without '.Parent = Workspace' it will become nil
And there is a lot of other uses for variables, I hope this helped!
1 | MyVariable = 20 -- You can put any data here. Like, numbers, strings, etc |
You can use variables for short cuts.
1 | Part = game.Workspace.Part |
You can name your own brick with a variable.
1 | Hi = game.Workspace.Part |