PlayerGUI Instance destroyed when kicked

I am trying to add a custom kicked gui to the PlayerGui if they are banned
but whenever I kick someone from the game, the PlayerGui is destroyed
how do I retain that single gui??

Thanks :ghost:

1 Like

It’s not possible, you should either display the GUI before kicking the player or kick them with a message if you need to tell them something.

player:Kick("You were kicked for breaking the rules.")
2 Likes

If it’s impossible then i need suggestions for a really hacky way

What does the GUI display? It’s important to consider whether or not it’s actually necessary.

It’s my next generation anti exploit and I want people to know the service is provided by my group. Also, what if I made my own kick system that destroys your character and disables all default GUI including resetting and chat.

Writing a whole custom kick system an awful lot of trouble and room for error just to advertise your group when it can be sufficiently credited in-game prior to kicking. You could simply kick them with a message like “You were kicked for suspected exploiting. Anti-exploit service provided by [group].” I really wouldn’t overkill for people who probably won’t play my game ever again.

4 Likes

I designed a special gui. What if I made a surface GUI and positioned the camera before being kicked?

Sorry, but it seems like you’re overthinking this. I would kick exploiters as soon as possible instead of setting up something that might not even render before they’re disconnected. I can’t suggest anything else.

6 Likes

Ok rip my gui then

If you want people to know it was your group, just insert a tagline into the :Kick() parameter. i.e. “You have been kicked by XxExploitBusterxX”

2 Likes

You could try put a sirfacegui in front of their camera

1 Like

Very troublesome, I think I’ll just leave this alone :C thanks for all y’alls help

Some games have done this (TraitorTown) (@hunte922)

I think you could try using a custom teleport gui.

I have made something like this before, and it wasn’t hard at all. I’m not sure what you’re getting, as I haven’t experienced it before.
2018-06-16_16-37-36
(link in case gif doesn’t load: Imgur)

How?

All I did was just kick the player using :Kick() and left the gui in the background. Nothing else.

Is FE enabled, did you do anything special??? When I kick a player, their playergui is destroyed. Also, when I kick a player, the red bar doesn’t show, their character just dissappears, maybe im doing something wrong.

UI elements are oot destroyed when you kick someone. However, the GUI you want to be visible needs to be shown with a grace period - usually 1-2 seconds before the kick occurs, which is what I do. The kick script also needs to be in the Gui you want to be shown, though I could be wrong about this, and it could work anywhere.

Yes, FE is enabled. And I didn’t fire a remote event or anything, I just kicked the player from a localscript inside the gui. What @fireking100489 said might be right. I’m not really sure. I just randomly did it and it worked.

1 Like