Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you make an exit gui that disconnects you ?

Asked by
Bulvyte 388 Moderation Voter
8 years ago

example... you click on it, roblox closes how you do that ?

1 answer

Log in to vote
2
Answered by
dyler3 1510 Moderation Voter
8 years ago

You could use Player:Kick() to disconnect the player from the server, however this wont close the window.To close out of the window, they'd have to do that manually. An example of how that'd work is like this (In a LocalScript inside of the Gui):

local Player = game.Players.LocalPlayer --Only works in Client-Side LocalScripts
script.Parent.MouseButton1Click:connect(function()
    Player:Kick("Custom Message") --Shows message when kicked, or can be empty for default message.
end)

Anyways, this should work. If you have any further questions, please leave a comment below. Hope I helped :P

0
atleast... someone who doesn't say "request" thank you! :) Bulvyte 388 — 8y
0
No prob, glad I could help. dyler3 1510 — 8y
1
Part of ROBLOX's core gui allows for you to exit out of a window as part of a gui element. However, to my knowledge this is not possible for ROBLOX users which may be understandable considering a exploiter could close the Roblox Player of all players in the server. M39a9am3R 3210 — 8y
0
Yup dyler3 1510 — 8y
Ad

Answer this question