Help with script working when not supposed to

Hey there,
I got this script here that is meant to give a player ownership of a booth if they don’t already own a booth and if the the booth they are trying to claim doesn’t already have an owner. However when I test it when 1 player claims ownership of a booth and then another player tries to claim the same board it lets him have ownership as well. I have no idea what’s wrong so any help is very apricated. :))

local button = script.Parent
local frame2 = script.Parent.Parent
local frame3 = script.Parent.Parent.Parent.Frame3
local plr = game.Players.LocalPlayer
local Values = plr:WaitForChild("Values")

	frame2.Visible = false
	if game.Workspace:FindFirstChild(Values.Booth.Value).Owned.Value == true then
		frame3.Visible = true
		frame3.Visible = false
		if Values.Own.Value == true then
			frame3.TextLabel.Text = "You already own a booth!"
		frame3.Visible = true
	Values.Own.Value = true
	game.Workspace:FindFirstChild(Values.Booth.Value).Owned.Value = true
	game.Workspace:FindFirstChild(Values.Booth.Value).Owner.Value = plr.Name

Well, it doesn’t work client-sided only. It has to be server-sided also for multiplayer.
It think the fastest way to learn is by watching youtube tutorials on how they make game so that you may see how in real live working game works. Look at the ways how they use remote-event and remote-function.

1 Like

How would I be able to get them to interact with the board then?