local succ = false;
script.Parent.FocusLost:connect(function(enter)
if game.Players.LocalPlayer.IsRapper.Value then script.Parent.Text = "You cant change names during rap" wait(2) script.Parent.Text = game.Players.LocalPlayer.RapperName.Value return end
if enter then
if script.Parent.Text == "" or not script.Parent.Text then return end
if #script.Parent.Text>35 or #script.Parent.Text < 1 or #script.Parent.Text:match("%W+") == #script.Parent.Text then --ERRORS HERE
The error is "attempt to get length of a nil value"
I'm just wondering how script.Parent.Text is possible to be nil when the line before that literally should filter that away.

1 comment
use len() instead of # for the text. This will not fix your error, just a suggestion