What is the purpose of a hashtag in a script?

Hello there!

I’ve been seeing some tutorials and I see hashtags being used for things such as text however I don’t really know why they need to be used plus I haven’t come across any tutorials covering this (although please do link anything on this that I’ve missed). I’ve seen for loops that include hashtags, below is an example:

for i = 1, #Text do

The only question I have about this is when would I ever use hashtags in scripts?

Any help on this is much appreciated! :slight_smile:

6 Likes

It can get either the length of a table or the length of a string. In this case, it gets the number of characters of a string.

17 Likes

It’s the length operator. It gets the length of the string/table.
e.g. #"hello world" returns 11

7 Likes

Ah I get it now. Thanks a lot for this!

5 Likes