Answers for "separate a string roblox"

5

separate a string roblox

local Message = "1:2" -- this is the message you want to split
local SplitMessage = string.split(Message, ":") -- the second arguement is where you want to split your message.
local Value1, Value2 = SplitMessage[1], SplitMessage[2] -- since split message returned an array, you can use array[1] and array[2] to get the values of the array.
print(Value1, Value2) -- // Prints out 1 and 2.
Posted by: Guest on October-11-2020

Browse Popular Code Answers by Language