#i need help ive been scripting for 1 week
1 messages · Page 1 of 1 (latest)
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
wtffff
- 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 🥺🥀🥀\
yeah
i'd make Owner a string value instead of boolvalue
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)
yeah makes much more sense
change Owner to StringValue
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
not only complicated
you will use for ALOOTTT
its pretty simple
you just need to understand how it works
get my full Roblox Studio course here (50% OFF):
https://linktr.ee/ByteBlox
photos of my pet pigeons: https://www.instagram.com/subnautica_man
discord: https://discord.gg/ay5gc9XcAh
wondered how to make a main menu in roblox studio? or how to create a shop which has working GUI? ive made lots of 2024 roblox scripting tutorials about all the d...
perfect 😄