I'm trying to make it so when a player joins the game, then they are assigned a random part.

When a player leaves, their assigned part isn't assigned and can be assigned to upcoming joiners.

game:GetService("Players").PlayerAdded:Connect(function(Player)
	for i,v in pairs (game:GetService("Workspace").HouseSlots:GetChildren()) do
		v.Owner.Value = Player.Name
		v.OwnerGui.TextLabel.Text = v.Owner.Value
	end
end)