Whenever running this for loop here, it prints “not claimed by player 1”, “tycoon 1 claimed by player 1”, “not claimed by player 2”, and then nothing else. Obviously the first tycoon is claimed so I understand why it is returning end, but I’m just not sure if the return end stops all loops or if the first loop is stopped then the second loop runs.
for _, tycoon in workspaceTycoons:GetChildren() do
repeat task.wait(.1) until player.Character
if player:FindFirstChild("ClaimedTycoon") then return end
print("not claimed by "..player.Name)
if tycoon:GetAttribute("Owner") ~= "Empty" then return end
print(tycoon.Name.."claimed by "..player.Name)
module.AssignTycoon(player, tycoon)
end
To add to what @PolyLacticSugarcane said, if you want the loop to continue but skip the lines if the if statement is false then instead of using then return end you should write then continue end and the loop will skip the lines below without stopping the function and the loop