For loop runs twice on one client, and three times on another

print(children)
	for i,v in children do
		if v:IsA("ObjectValue") and GetName:InvokeServer(v) ~= "Leader" then
		local MemberTemplate = script:WaitForChild("Templates"):WaitForChild("MemberTemplate"):Clone()
		MemberTemplate.Parent = MemberFrame
		local content = game.Players:GetUserThumbnailAsync(v.Value.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
		MemberTemplate.ImageLabel.Image = content
		MemberTemplate.NameLabel.Text = v.Value.Name
		if plr ~= leader then return end
		if v.Value ~= plr then
			MemberTemplate.TextButton.Visible = true
		end
		end
	end

the table has 3 values on both clients so why is it only running twice for once and three for another, btw yes i printed at the absolute top of the for loop not under the if statement on both

oh my days i feel so stupid i spent 3 days trying to fix this when all it was is because i was returning instead of continuing for some reason

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.