Kick message with newline isn't working in-game

Hi, So I’m trying to make this game a group only game with a script and to make the kick message more pretty I added newlines (\n) and they work just fine in studio but when a player joins the game they just get an empty kick message and I can’t seem to figure out the issue I’ve tried spacing out the newline so like instead of \n\n its \n \n

Here is the current kick script

if not Player:IsInGroup(3759311) then 
	Player:Kick("\n\n Your account has failed one of our security checks. \n\n Please make sure you are in our group. \n\n If you think this is a mistake join our discord and contact a staff member. \n\n Error ID: 1 \n")
end

and this is what a player gets if they aren’t in my group

Its quite annoying as they spam message me thinking the game has banned them or its been serverlocked and I don’t want to kick them client-sided as I’ve heard exploiters can avoid that.

Tested your code, and made a game.Players.PlayerAdded statement and auto kicked, it looks fine.

I recon you do this;

game.Players.PlayerAdded:Connect(function(Player)
	if not Player:IsInGroup(3759311) then 
	Player:Kick("\n\n Your account has failed one of our security checks. \n\n Please make sure you are in our group. \n\n If you think this is a mistake join our discord and contact a staff member. \n\n Error ID: 1 \n")
	end
end)

Happy Forum anniversary, by the way!

3 Likes

Thank you!

Also, Not sure this really matter but when the player joined a function ran I don’t know if that was the issue with the kick message but it has been fixed.

1 Like