Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I kick players from the game after they click an object?

You know how in games you click on an object or at the end of the game it shows the "You were kicked" screen? How do I do that? Is this a dumb question?

3 comments

0

Oof, do you have a script that you tried?

0

what kind of game kicks you when you're at the end of the game..?

0

The mirror kicks you at the end

1 answer

✓ Accepted answer

Assuming that you want to use a part in the workspace to do this, you would need to insert a click detector and a script into the object you want the player to use. In the script, the content should be the lines below:

script.Parent.ClickDetector.MouseClick:Connect(function(plr)
	plr:Kick("reason")
end)

The listeners of the MouseClick event get the player that clicked the button, so all you have to do is kick them. Hope I helped.

1 comment

0

Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.