Due to my vague knowledge on what you are trying to achieve, I will run through a problem I'm seeing with your scripting.
Use of if , else, and elseif
You seem to be putting a spaces where it isn't necessary! Lets take steps back to learn how these work.
if (bool1) then
print('step one')
elseif (bool2) then
print('step two')
else
print('final resort')
end
| bool1 |
bool2 |
Output |
| true |
|
step one |
| false |
true |
step two |
| false |
false |
final resort |
If bool1 of these is true, it'll run whatever is in that if statement. However, if it isn't I'll skip down to elseif and check another if statement. If the if statement and all the elseif statements fail, it will finally go to the else statement. |
|
|
1 comment
Not sure why this is happening but just to let you know the first image shows datastore key