Alright, is that all you don’t understand?
I don’t really get why we clone the whole PlayerGui
Oh my bad I didn’t see the top line
Thats all I don’t understand
Alright, so just the SplitMessages
your having difficulties with?
Yup. (This is random text because it has to be over 20 characters long)
Alright, so this is how SplitMessages
work.
So basically, we define the message that the player chats.
So, let’s pretend this is the text we’ve set:
local TextToCheck = "Test me For Text"
Now, what this Split Message does, is it creates a table.
When we say:
msg:split(" ")
What we’re actually doing is we’re looking for the spaces (" ") in the text & then we put each word on it’s own as a value in the table.
So it would essentially become.
local Words = {"Test", "me", "For", "Text"}
Each time we’re saying
SplitMessage[1]
We’re getting the first word from that “invisible” Words list.
In total this is what happens:
local TextToCheck = "Test me For Text"
Then we check the messages for having spaces.
local SplitWords = TextToCheck:split(" ")
Once we’ve done that.
We can get each word from saying.
print(SplitWords[1])
^
This would print “Test”
print(SplitWords[4])
^
This would print “Text”
I hope this helps you understand it!
Please mark this post as solution if it works:
Thanks! That helps a lot and I’ll mark it now.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.