Text label script not filtering user-inputted text

hello! I have this script that creates an overhead label for a player once it receives a remote event from a nickname selection screen. I’ve been trying to filter the text but I don’t really know how to use the filtering async. I got to this script, but it isn’t filtering the text (it’s still letting stuff through the filter that should be stopped). Can someone help me figure out how to filter it?

client.NicknameChosen.OnServerEvent:Connect(function(player, name, color, font)
	local nameItems = Instance.new("Folder", player)
	nameItems.Name = "NameItems"

	local nickname = Instance.new("StringValue", nameItems)
	nickname.Name = "Nickname"
	local filteredText = TextService:FilterStringAsync(name,player.UserId) 
	nickname.Value = filteredText:GetNonChatStringForUserAsync(player.UserId)

	local ncolor = Instance.new("Color3Value", nameItems)
	ncolor.Name = "Color"
	ncolor.Value = color

	local namefont = Instance.new("StringValue", nameItems)
	namefont.Name = "Font"
	namefont.Value = font.Name
	
	wait(2)
	player.PlayerGui.NameSelectionScreen:Destroy()
end)

Pretty sure text won’t filter in studio. Try publishing and testing it in game, but keep the game on private just in case you messed up… lol