How do I create a Player Booth?

Hello, I am Rbl0xGaMer949! I am currently trying to start up a new project, but I ran into some trouble.

What are you trying to achieve?

  • I am currently trying to create a booth. When the player walks to the booth, he can click and claim it if no one else already has it. If the player claims it, he can add a logo decal to it, and put the group name (or whatever he wants as the logo name), and desc. I want the player to also be able to change colors but the player can only have 1 booth.

Whats the Issue?

  • The current issue is the set up. I have a booth concept already made but the problem is getting everything to work.

Solutions Tried Already

  • Currently, I have tried looking for tutorials everywhere but some I find don’t work and most of the time I do not see any.

I know there is already things like this on Roblox, but I want to make a better version but cannot tutorials on this.

At this point currently, any advice or signs that Im on a right track is greatly needed. :smiley:

1 Like

I think you should, either by attributes or value instances, have a bool value “attached” to the player to allow or reject the booth ownership request. Does this fix the problem or did I missinterpret the problem at hand?

1 Like

Tutorials are great for individual small issues, but expecting a tutorial for all possible issues is unreasonable. You will eventually need to figure out issues on your own through your own code.

The first step would be to break down your problem into individual steps. Then start working on these steps and eventually combining them to create an end product.

Here’s a pseudocode (English code) version of your first task, which is booth ownership.

OnButtonClickEvent do
Check if someone has already claimed this booth
Check if the current player already owns a booth
Set booth ownership variable to player or playerId.

As for how to ensure a player does not already own another booth, what you could do is set an attribute for all the booth called “PlayerIdOwner”. Then, you can run a loop that goes through all the booths PlayerIdOwner attribute and if the script does find a player id that matches the player id clicking the button, then you know that the player cannot claim another booth. If no match is found, then let them claim the booth.

If you do go with this solution, then make sure to set the attribute “PlayerIdOwner” when they do claim a booth.

More info on attributes here: Instance Attributes


I’m going to help now, making scripts for it.

Hello everyone. I found a little piece of code that could possibly work. Ty all for the help.