Hello. I have a kick script, it uses \n
to create new lines, I’ve done this before on other scripts/games and it worked fine. I tested in multiple studios trying to figure out why it won’t work at all
Code:
player:Kick("You have been banned for " .. BanTimee .. "days. \n Reason: Cheating.")
(no its not due to the BanTimee
variable, I’ve tested other ones that are just words.)
I had changed it to this (removed a [[]] thinking that was the problem)
but it still didnt add a new line and cut off the rest
What is the BanTimee
variable defined as?
Try using string.format
player:Kick(string.format([[
You are banned for cheating!,
Time Left: %s
If you believe this is a false ban appeal at: DISCORD_LINK_HERE
]], Time_Left))
Just a number value, in this case 7.
Sorta works in the output
doesnt work in kick message
2jammers
(2jammers)
July 21, 2022, 9:19pm
#11
player:Kick(string.format("You have been banned for %c days.\nReason: Cheating.", BanTimee))
Joshument
(Joshument)
July 21, 2022, 9:22pm
#12
Are you sure that it might just ignore single newlines? Try using two.
Tried that too, nothing seems to be working.
Joshument
(Joshument)
July 21, 2022, 9:25pm
#14
Not sure if they changed the API, but I’ve noticed some people have it working just fine, not too sure
I think a devforum regular is going to have to make a bug report on this, it’s happening to me as well.
Ive tried everything to get this working, even:
me:Kick('Line one\10Line Two')
it appears that \n is registering as the kick message, it is just not displaying correctly
Code:
delay(4, function()
game.Players:GetChildren()[1]:Kick('Line One\10Line Two')
end)
orbspell
(orb)
July 21, 2022, 11:45pm
#17
Roblox recently took this functionality out due to an exploit;
This was recently changed intentionally to fix an exploit, so is expected behavior.
Any sequence of spaces and newlines is now collapsed into a single space character, and the length of kick messages is limited to 200 characters.
Ohhhh okay, thank you. Do you know if this is temporary or permanent?
orbspell
(orb)
July 22, 2022, 2:04pm
#19
I assume it’s temporary till they find a proper solution.
mr_agario
(darkXwolf17)
November 26, 2023, 11:20pm
#20
Don’t know what I was expecting from Roblox but they still haven’t come up with a proper solution.
Surely it’s not too hard to limit \n to 5 right?
Gingeeeers
(Gingeeeers)
November 27, 2023, 12:09am
#21
Even easier:
Put the kick message inside a scrollingframe