i want to make it so it auto gives the player a plot
it does not work no errors
local players = game:GetService("Players")
local plots = workspace:WaitForChild("Plots")
players.PlayerAdded:Connect(function(player)
for i, plot in pairs(plots:GetChildren()) do
if plot.Owner == "" then
plot.Owner.Value = player.Name
end
end
end)
players.PlayerRemoving:Connect(function(player)
for i, plot in pairs(plots:GetChildren()) do
if plot.Owner == player.Name then
plot.Owner.Value = ""
end
end
end)