What is "Close" and what is the case of use

Hello everyone,

I was searching on DevHub “again” and after a bit of surf on the net I fount “Close” function under “ServiceProvider” but I have no idea what it does or what is the case of use.

Screenshots

EDIT: also does it being fired when player pressed exit button.

It’s an event that fires whenever the client closes the Roblox application.
Or aka when a client leaves the game.

Can be used for anything that needs to be finished before the client leaves, that’s what :BindToClose() does too.

2 Likes

Great explanition, this will definitely help me but why there is two function as it does the same thing? is the speed or runtime is different?

:BindToClose() fires when the server shuts down while close fires when the client leaves, so they definitely don’t do the same thing in terms of functionality.

1 Like

Hmm… BindToClose waits 30 seconds for processes to finish up before it closes the entire client connection. That might be the difference. Might be more, not sure about them.