I was making my code but when I finished I checked everything and made sure the was no errors and I was watching tutorials on YouTube on how to fix this script if you know please help me What do I have to do to make this script run propely?
Here the script:
1 | function hello() |
2 | print ( "hi" ) |
3 | print ( "hi" ) |
4 | return ( 10 ) |
5 | end |
6 | hello() |
What do you need to return? Do you want to print 10, after printing 'hi' twice?
And you need to put local
in front of the function
.
01 | local function hello() |
02 |
03 | print ( "hi" ) |
04 |
05 | print ( "hi" ) |
06 |
07 | return ( 10 ) |
08 |
09 | end |
10 |
11 | print (hello()) |
12 |
13 | --[[ Output: |
14 |
15 | hi |
16 | hi |
17 | 10 |
18 |
19 | ]] -- |
This repeats it.
1 | on = true |
2 | ----------------- |
3 | if script.Disabled = = false then |
4 | repeat |
5 | print ( "Hello" ) |
6 | wait( 1 ) |
7 | until |
8 | script.Disabled = = true |
9 | end |
This is what disables the script after ten seconds.
1 | wait( 10 ) |
2 | script.Disabled = true |
You could also do this and it'll pop up with a number next to it to tell you which one it is instead of the x2.
1 | for hello = 1 , 10 , 1 do |
2 | print ( "Hi" ,hello) |
3 | wait( 0.5 ) |
4 | end |