\n no longer works for Player:Kick()

Recently, me and several other developers have encountered an issue with the Player:Kick() function, where attempting to use newlines does not function.

I’m not sure when this issue began occurring; however, I first noticed it was occurring a few days before I made this post originally. This has majorly impacted some of my game functions, as some of my server kick messages are designed to use newlines to be more easily readable.

Steps to reproduce:

  1. Create a new game in Roblox Studio.
  2. Press F5 and play the game.
  3. From the command bar, run: game.Players.LocalPlayer:Kick("test1\ntest2")

Expected behavior:
The game creates a new line between “test1” and “test2”.

Actual behavior:
The game does not create a new line.
image

17 Likes

This is intentional according to Tiffblocks

3 Likes

That’s extremely inconvenient if it is, there’s legitimate uses for having line breaks in kick messages

8 Likes

As this was an intentional change, I believe that creating a feature request for formatting kick messages would be reasonable. This is not an engine bug.

5 Likes

New limits for this are too restrictive. 200 chars is less than a tweet and makes it difficult to tell players what happened and what to do in the case of e.g. a ban, and limiting newlines just sounds like a way to control the size of the prompt. Limiting the maximum number of newlines is a much better solution in that case. Resizing the text in the window is also a good solution for managing prompt size if that is a factor in these changes.

11 Likes

They should have solved the “exploit” problem by displaying the kick-message in a scrolling frame rather than a 200 character limit for a band-aid fix. Would someone kindly make this a feature request?

The current restrictions on the kick function are limiting creativity.

11 Likes

Guess now all we can do is wait for them to revert the change, assuming they ever do, which if they don’t, that’s just terrible design if I’m being completely honest.

EDIT: Not going to mark this as solution, I’m hoping for a statement from Tiffblocks

3 Likes

How is that relevant, though?

The repro steps correctly tell you to use the Studio command bar, not the dev console.

Terrible, it makes my ban screen look garbage.

Time for an update to the kick window? Maybe support for rich text and new lines again?

1 Like

Thats great, now my ban message looks like poetry.

Jokes aside, Roblox should announce such changes as it is very important. Sad to see that instead of removing the root cause of the exploit, they just slapped in a band-aid solution.

3 Likes

Well to be fair, I’m pretty sure the root cause of the issue is engine limitation (read: not feasible to fix) and clever abuse of prompt resizing. This was likely the only feasible solution, but being so aggressive with it is not acceptable.

Reviewing my ban messages, the majority of them come out to around 160 characters, but this is with careful truncation of information, and moderators being terse when writing ban reasons. Less terse moderators will create longer ban messages, and putting a restriction on the ban message makes it harder to ban users quickly with accurate ban messages, and ours are already getting close to the limit.

I.e. you’d have to ban a user before they can do damage with a quick and short ban message, but then you have to get the user id to update the ban message with the better one, while the banned user only saw the short one when they were kicked, and may be confused; this is bad user experience.

Here are some examples:

162 chars

You have been banned for:
Griefing, deleting and replacing parts, revenge griefing. To appeal this ban, see the game’s social links and join the community server.

118 chars

You have been banned for:
Griefing, insulting other users. To appeal, join the community server and follow directions.

172 chars

You have been banned for:
Alt account, deleting multiple user’s build, giving horrible additude when confronted. To appeal, join the community server and follow directions.

184 chars

You have been banned for:
Webbing another user’s build after being asked to stop, refusing to leave people alone when asked. To appeal, join the community server and follow directions.

1 Like