trying to split a string (New Flood Mod)

Hi I’m trying to use

local TeamPropP = {
TeamPropP = split( "Name-Bob-Joe-John-Sam-Steve-Ross", "-")

which is throwing the error

attempt to call global 'split' <a nil value>

I though it could be used according to
I am used to python’s spit(’-’) function. Could you help me define it using the method to split strings in lua?

Use string.Explode("-", “Name-Bob-Joe-John”)

local str = "Hello there kind child"

local tbl = string.Explode( " ", str )

PrintTable( tbl )

Reference - string.Explode wiki

Edit: ninja’d


it works thanks!

local People = {
People = string.Explode( "-", "joe-john-sam-steve-ross" )