Leave Court Script

So, I made a join court script for my basketball game, but I don’t know how to make a leave court script.
Screenshot 2021-07-13 121435

I’m trying to make it when the player is on they can see a GUI to leave the court.

Create a gui and place it in startergui, in the gui, make the button set the humanoidrootpart of the player’s character to the position you want. At the end of your script that gets them in the court, make it access the player’s playergui and make the frame visible.

1 Like

My approach would be something like this:

  1. Keep track of who is on the court by using an array
  2. Upon the player joining the court, fire a remote event - which will activate a leave court GUI
  3. Detect player input for said GUI which will fire another remote event (letting the server know the player wishes to leave the court)

Hopefully this helps you out in some way.

Ok, thanks, I will try that out.

Thank you very much, it worked!