local plots = {game.Workspace.Plots.CurrentPlots:GetChildren()}
game.Players.PlayerAdded:Connect(function(plr)
for _, plot in plots do
if plot:FindFirstChild("Owner") and plot.Owner.Value == "None" then
plot.Owner.Value = plr.Name
print(plot.Name.. "has been assigned to Player:" ..plr.Name)
end
end
end)```
#Help me with a plot system
1 messages · Page 1 of 1 (latest)
uh
just so you know
:GetChildren() returns an array of all objects inside of a parent
{Part1, Part2, Part3, Part4} -- {Plot1, Plot2, Plot3, Plot4, Plot5, ...}
so you don't need curly brackets for :GetChildren()
cuz its already a table
@vocal bay
this is missing a break , without break a player can take multiple plots
oh yeah
i forgot about this
also plot list is not updating , so if there is any plots removed or added in runtime , list will not know
also there is no handle if plots are full or not
if its not "None" then its full
?
script runs once you join
1 time
can use smth like
if not assignedPlot then
than print or kick etc
thats what i meant with handle
why overcomplicating
** You are now Level 4! **
oh
cause explaining is good
well maybe each plot has its own name , and someone is trying to take an plot that is already taken or searching for it
he handles it so everything is good
but ofc you can create a variable
i came here looking for a builder but i guess i will just keep my ideas for me
i hate desigining and building i swear
idk how to build shit 😭
for real its hard
i cant even build simple tool or smth
i cant build a damn plot but i can script a whole game
fr
my ideas are simple and stupid but cant find a guy that can build them
its a tycoon
easiest shit
i tried making tycoon and i failed
i mean
its kinda working but data saving is poor
i even used object pooling 😎
yeah
i tried many times and i failed many times cause i aint a builder
i need to catch a nice builder to help me
oh damn looks nice
my best build ig 😭
its good enough
dammit i cant even make that sadly
so far going ok