#i need help ive been scripting for 1 week

1 messages · Page 1 of 1 (latest)

upper bobcat
#

aaaa tutorials are not helping

#
    game.Workspace.Plots.CurrentPlots.Plot1,
    game.Workspace.Plots.CurrentPlots.Plot2,
    game.Workspace.Plots.CurrentPlots.Plot3,
    game.Workspace.Plots.CurrentPlots.Plot4,
    game.Workspace.Plots.CurrentPlots.Plot5,
    game.Workspace.Plots.CurrentPlots.Plot6
}


game.Players.PlayerAdded:Connect(function(plr)
    for i, v in pairs(plots) do
        if v.Owner.Value == false then
            v.Owner.Value = true
            print(v.. "has been assigned to" .. plr.Name)
            error("Working or nah?")
        end
    end

end)```
#

eyeballed this script with no help

#

is it correct cuz uh not even printing the error fr

fiery fractal
#

wtffff

fervent jasper
#
  1. what is this
#
  1. what is it meant to do
upper bobcat
#
  1. Its supposed to get the player a plot
    1 ITS supposed to ceck if there is an owner assign an owner then ill add more.
#

is it that bad 🥺🥀🥀\

steep lynx
steep lynx
#

so the value will be your player's name

#
local plots = workspace.Plots.CurrentPlots:GetChildren()

game.Players.PlayerAdded:Connect(function(plr)
    for _, plot in plots do
        if plot.Owner.Value == "" then
            plot.Owner.Value = plr.Name
            print(plot.. " has been assigned to " .. plr.Name)
        end
    end
end)
upper bobcat
#

yeah makes much more sense

upper bobcat
#

do you know any tutorial on how i can properly use for loops?

#

i see its required for most complicated systems

#

but never know how i can use it

steep lynx
upper bobcat
#

for index, variable do

#

thats what i know

steep lynx
#

you will use for ALOOTTT

steep lynx
#

lemme try find one

upper bobcat
#

thanks because

#

everytime i come across needing to use a for loop i need help

steep lynx
#

its pretty simple

#

you just need to understand how it works

upper bobcat
#

perfect 😄