Whats wrong with this script to split a string?

	local TextToCheck = script.Parent.Holding.Text
	string.split(TextToCheck)
	TextToCheck = TextToCheck[2]
	print(TextToCheck)

“TextToCheck” at the beginning will be “Holding X”. i want to split it to get “X”.
i thought this was gonna work, but it just comes back as nil.

There’s no pattern specified for string.split() (argument 2)

what do you mean
char limitttttttttttt

This should work

local TextToCheck = script.Parent.Holding.Text
local split = string.split(TextToCheck, " ")
split = split[2]
print(split)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.